Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Well, the first thing you'll need to do is tell Perl what the relevant files are. The simplest way to do that is to pass it in as a command-line argument. Look for @ARGV in perldoc perlvar for that. If the files are all in the same directory and there are no other files in the directory (and you don't want to type out 25 separate filenames), you could use a loop on STDIN to receive piped into into your script:
That way, you can get all your filenames into your script by simply doing:
As for actually opening each file for reading, you've already done that. What's confusing about reading the files? Have you checked perldoc -f open? As for hashes, they're pretty simple:
It looks like you'll be alternating lines; line1 is the key for the sequence in line2, line3 is the key for the sequence in line4, etc. In reply to Re^3: reading files in directory
by Riales
|
|