use IO::File; my %files; foreach my $name (@ARGV) { my $file = IO::File->new($name) or next; # print error message her +e, etc. my @lines = <$file>; $files{$name} = \@lines; $file->close; }
Jeff
R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--
In reply to (jeffa) Re: How do I read the files in @ARGV one by one
by jeffa
in thread How do I read the files in @ARGV one by one
by Elias
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |