Tuesday 1 April 2008

Commnd line options in perl

# Usage ./this_script-f /tmp/somefile.out -l 21,22,23,24

use Getopt::Std;

#Required if using strict.
our($opt_f,$opt_l);


getopt('fl');

my $inputfile=$opt_f;

my @list=split /,/,$opt_l;

1 comment:

Anonymous said...

Hello. This post is likeable, and your blog is very interesting, congratulations :-). I will add in my blogroll =). If possible gives a last there on my blog, it is about the TV Digital, I hope you enjoy. The address is http://tv-digital-brasil.blogspot.com. A hug.