Opening multiple files at once....
- Hi all, I'll get to the point quickly:
my @FILES = ("file1", "file2", "file3", "file4");
##What I would like to accomplish with
##the above is something like this
open (FILE, "@FILES") || die;
##then put the files contents into an array
my @contents = <FILE>;
I've come to conclusion that the only way to accomplish this is to do
a foreach on @FILES. Then open and close until I have all the
contents. Is there any other way to accomplish this.
Thanks, and thanks for the help on the previous stuff,
- Thanks for the help all,
I'm having a slight, almost insignificant problem with the
suggestions. I tried them both, but I'd like to keep things 'neat'.
My filenames look something like this:
When I tried to put them into the suggestions, I would either get some
of the files to print. As if it was skipping a file or something. Or
it would tell me that it couldnt open up the filename.