Please add these 2 lines to your script, then run your script, then post the output of your script so that we may all see the contents of the @line array:
print "line contains:\n";
print Dumper(\@line);
It will be useful for the rest of to know if this is a simple array, or an array of arrays, or an array of hashes, etc. And we will be able to see if there is even a 4th element of the array.
If the File hashes are not too big, please also post their contents.
Also, make sure you are using the strictures (use warnings; use strict;), as these may help to point out undefined or unititialized variables. |