Perl (v5.16.3) works fine on my older Win7 Gateway. But on a new Win8 Gateway (same Perl release), it seems that @ARGV does not work.
use strict; my $numargs = @ARGV; print "numargs = $numargs\n"; if ( $numargs > 0 ) { for my $a ( @ARGV ) { print " $a\n"; } }
Running this with the command line
testarg a b c
produces the result
numargs = 0
I added tests to print @INC, %ENV, and a list of my own and everything else is fine. It's just @ARGV that does not work. Any ideas? I understand that this could well be a Windows issue, rather than Perl. But other command-line programs work fine.
In reply to Why doesn't @ARGV work? by LloydRice
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |