in reply to Opening an array of file names

Change:
my @fileNames = [ "manimp1.txt", "manimp2.txt" ];

to:

my @fileNames = ( "manimp1.txt", "manimp2.txt" );

The square brackets create a reference to an array. I think you just want to construct an array. See also:

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

    Yes, that did the trick, thank you.