in reply to reading N files
for (@ARGV ) { open( my $in, "<", $_ ) or die "Can't open '$_': $!\n"; push @infile, $in; }
Presuming a recent enough Perl, of course. See perlopentut and the open docs. Older Perls you could use IO::File instead in a similar fashion.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: reading N files
by gri6507 (Deacon) on Jul 19, 2006 at 14:44 UTC |