The following code works only on mac, but not on windows7.
perl -e "print @ARGV" aaa^bbb
On Mac (perl 5.10, darwin) it prints out as expected: aaa^bbb
On Windows 7,32bit (ActivePerl 5.12) it prints out: aaabbb
The “^” character is thrown out of @ARGV.
This character is part of a filename that I’m using the script with, so I need to be able to read it from @ARGV.
I tried using “aaa\^bbb” but it just prints out “aaa\bbb”.
It doesn’t work on Strawberry Perl, either. However, you can get around this by passing the argument into quotes:
Using Strawberry Perl on Windows 7, the output is