LloydRice has asked for the wisdom of the Perl Monks concerning the following question:
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why doesn't @ARGV work?
by NetWallah (Canon) on Jul 17, 2014 at 04:23 UTC | |
|
Re: Why doesn't @ARGV work?
by Your Mother (Archbishop) on Jul 17, 2014 at 04:11 UTC | |
|
Re: Why doesn't @ARGV work?
by Anonymous Monk on Jul 17, 2014 at 07:48 UTC | |
|
Re: Why doesn't @ARGV work?
by gurpreetsingh13 (Scribe) on Jul 17, 2014 at 10:04 UTC | |
|
Re: Why doesn't @ARGV work?
by bulrush (Scribe) on Jul 17, 2014 at 11:53 UTC | |
by LloydRice (Beadle) on Jul 17, 2014 at 12:34 UTC | |
by LloydRice (Beadle) on Jul 17, 2014 at 16:01 UTC | |
by LloydRice (Beadle) on Jul 17, 2014 at 16:12 UTC | |
by 2teez (Vicar) on Jul 17, 2014 at 16:38 UTC | |
by Anonymous Monk on Jul 18, 2014 at 07:54 UTC | |
|