This is fairly straightforward - you might want to use Super Search for other examples.
Commandline arguments are available in the array @ARGV
Try something like this:
#!/usr/bin/perl -w use strict; my $in_file = shift @ARGV; open(INFILE, "$in_file") or die "Can't open input file!: $!\n"; while (<INFILE>) { # do stuff with each line of INFILE until # there are no more lines to process } close(INFILE);
Hope that helps.
BazB.
In reply to Re: New Perl User Question
by BazB
in thread New Perl User Question
by Rpick
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |