in reply to Opening an array of file names

I am really lost in your subroutine.
First of all, the name doesn't seem to match up with what it does.
What is it that you are trying to do?
More normal would be to call a subroutine to process each individual file - are the files related amongst each other somehow? Or are they independent?
my @fileNames = ( "manimp1.txt", "manimp2.txt" ); foreach my $file (@fileNames) { processFile($file); } sub processFile { my $fileName = shift; open (....) ... what is supposed to happen here? }

Replies are listed 'Best First'.
Re^2: Opening an array of file names
by tnyflmngs (Acolyte) on Apr 04, 2012 at 02:58 UTC

    Well, yes the two files are related. They both contain parts of a single price file from one of our suppliers. My goal is to open each file and read it into a hash. What I am attempting to do is place each line in an array and perform some operations on the line before it goes into the hash. I have worked on it a little today but it is on my work VM and it is late so I don't feel like firing up my laptop to VPN. I will place the new script on my scratchpad tomorrow.