Arguments not passed in Windows XP

H

howard.lum

I have a simple script that prints the number of passed arguments:

$numargs = scalar @ARGV;
print "numargs $numargs\n";

This script works fine on a number of our PCs but fails on two
particular PCs.

Invoking the script using 'numargs.pl 1 2 3' results in 0.
Invoking the script using 'perl numargs.pl 1 2 3' results in 3.

How can I get the first method to work properly? I am running v5.8.7
from ActiveState on Windows XP.
 
P

Paul Lalli

I have a simple script that prints the number of passed arguments:

$numargs = scalar @ARGV;
print "numargs $numargs\n";

This script works fine on a number of our PCs but fails on two
particular PCs.

Invoking the script using 'numargs.pl 1 2 3' results in 0.
Invoking the script using 'perl numargs.pl 1 2 3' results in 3.

How can I get the first method to work properly? I am running v5.8.7
from ActiveState on Windows XP.

This question comes up every two or three months. The last two times
in my recollection, however, it was in perl.beginners, not
comp.lang.perl.misc:

http://groups.google.com/group/[email protected]&rnum=1&hl=en#7533b703b60074ee

Paul Lalli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,264
Messages
2,571,065
Members
48,770
Latest member
ElysaD

Latest Threads

Top