in reply to New Perl User Question
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: New Perl User Question
by Rpick (Novice) on Feb 04, 2002 at 14:19 UTC |