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:
In reply to Re: Opening an array of file names
by toolic
in thread Opening an array of file names
by tnyflmngs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |