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;

Editing long lines in vi

<pre>
:set nowrap
</pre>

That's it.
Blogged with the Flock Browser