I am a new perl user and I am running into a problem.  I am trying to use
argv and it's not returning the correct response on my laptop, but it's
working fine on another machine.  The only difference between the two
machines is that on my laptop, I first installed the perl AS package for
windows rather than the MSI package from
http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl
However I tried to uninstall the AS package and installed the MSI but it's
still doesn't work.  On the other machine that works, I only install the
MSI package.  Not sure if that made any difference.

test.pl
$test= @argv[0];
die "nothing in array" if (!$test);
print $test;

c:\test.pl one two

expected: (this is what I get on my other machine)
onetwo

Problem: (this is what I get on my laptop)
nothing in array at C:\myperl\test.pl line 2.

Any help will be greatly appreciated!



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to