Typically you would do something like this:
for my $filename (@list_of_file_names) { process_file($filename); } sub process_file { my $filename = shift; open my $handle, '<', $filename or die "Can't open file '$filename' for reading: $!"; my @Result; while(<$handle>) { next unless $_ =~/\d+\schunk/; s/\s+/ /g; push @Result, $_."\n"; } # do something interesting with @Result here }
In reply to Re^3: Array reference
by moritz
in thread Array reference
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |