Perl

PERL Script

Perl is a general-purpose programming language originally developed for text manipulation and now used for a wide range of tasks including system administration, web development, network programming, GUI development, and more.

The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal). Its major features are that it's easy to use, supports both procedural and object-oriented (OO) programming, has powerful built-in support for text processing, and has one of the world's most impressive collections of third-party modules.

Like awk script, perl script can also be used to perform post analysis of trace files. Perl script are simple any tiny than awk scripts.

To run a Perl program from the Unix command line:

1. perl progname.pl

Alternatively, put this as the first line of your script:

1. #!/usr/bin/env perl

...and run the script as /path/to/script.pl. Of course, it'll need to be executable first, so chmod 755 script.pl (under Unix).

(This start line assumes you have the env program. You can also put directly the path to your perl executable, like in #!/usr/bin/perl ).

after running your tcl file copy and paste the perl script to the same directory and then the perl script can be run from your terminal by typing the following command.

perl filename.p tracefilename.tr

1. Perl script for calculating packet sent, packet received, packet dropped, routing overhead, packet delivery ratio and average path length can be downloaded for here. Click here.

2. Perl script to calculate average end to end delay can be downloaded from here. Click here.

Note : Copy and paste this perl script to the directory where tcl script is saved.