in reply to Re^3: @ARGV being corrupted
in thread @ARGV being corrupted

When you transfer a script across OS platforms, unless it is transferred via FTP in ASCII mode, it will suffer from the fact that one OS uses different line endings than another. And perl (the executable) doesn't know how to deal with a shebang line that looks like: #!/usr/bin/perl^M.

This is further exhaserbated by the fact that you were dealing with @ARGV. That special variable takes its values from the command line. The command line can be a combination of what was typed when the script was run, as well as what was on the shebang line.

Don't forget to transfer in ASCII mode, and when you do forget, be sure to run unix2dos or dos2unix to fix the line endings.


Dave