in reply to Capturing and then opening multiple files
use Data::Dumper; my @pal_files = glob '*palindromes.csv'; print Dumper(\@pal_files);
To read the files, just open them in a loop:
for my $file (@pal_files) { open my $IN, '<', $file or die "$file: $!\n"; while (my $line = <$IN>) { # Process the line... } }
You can also assign the filenames to @ARGV and use the diamond operator:
@ARGV = glob '*palindromes.csv'; while (my $line = <>) { # Process the line... }
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Capturing and then opening multiple files
by Peter Keystrokes (Beadle) on Jun 20, 2017 at 20:27 UTC |