in reply to "uninitialized value in concatenation" is initialized and involves no concatenation that I can see.

I suppose it is in this line

print STDERR $line,"\n";
Even I have come across cases where perl slightly miscalculates the line numbers when reporting them in errors or warnings. My guess is because that's the print statement that has a concatenation. So please try to print the Dumper of @lines array and see where the undef comes in that array. Also probably seeing what $/ variable has can help diagnose further. Please also check the documentation for the split method for knowing when it can return an undef in the resulting list.


Thanks,
Ganesh
  • Comment on Re: "uninitialized value in concatenation" is initialized and involves no concatenation that I can see.
  • Download Code