good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Multiple files openedby kokakola613 (Initiate) |
on Sep 24, 2010 at 05:20 UTC ( [id://861730]=perlquestion: print w/replies, xml ) | Need Help?? |
kokakola613 has asked for the wisdom of the Perl Monks concerning the following question: Hi, I'm trying to write a script that parses a file, which itself contains file names. I want to open each one of these files listed and perform some data analysis. However, I'm getting an error any way I try to do it. Here is my original code (adapted)
I wasn't surprised the above didn't work, since INP would have to be closed for the other file to be read in the subroutine I called. However, the following did not work also:
I then get an error on uninitialized values. I could slurp the entire file into a string, and then use split to get the lines, but that seems like it would be costly. Any ideas?
Back to
Seekers of Perl Wisdom
|
|