argstest.pl Hello ... New build is 64-bit Perl28 from ActiveState.
Check your file association for perl*. My guess is it's just running c:\path\to\perl.exe "%1". If that's the case, then none of your other command-line arguments are being passed to argtest.pl, hence the ARGV is undefined. You want the association to be something like c:\path\to\perl.exe "%1" %*, where the %* passes the remaining command-line arguments to the script.
FOOTNOTE *: sometimes assoc .pl then ftype perl_auto (replace perl_auto with the results of the assoc). If not there, run regedit, then search either HKEY_CLASSES_ROOT\.pl or HKEY_CURRENT_USER\Software\Classes\.pl, look in the "(Default)" item, which will tell the name of the class (might be perl_auto; on my system, since i manually associated, it's called PerlScript); then at the same level as .pl, search for a key (folder) with that name, then dig into the ...\shell\xxx\command\(DEFAULT), where xxx will be "run" or "open" or some such.
update: haukex's suggestion of "Have you tried running perl argtest.pl Hello" would lend further strength: if that command works, but the auto-associated run does not, it's almost certainly the file association.
In reply to Re: command line args
by pryrt
in thread command line args
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |