in reply to Problem with @ARGV in Win32 Perl

I'd be willing to bet that the following would work as you expect:
C:\temp\Perl>c:\path\to\perl.exe test2.pl 1 2 3 4 5 ^^^^^^^^^^^^^^^^^^^
The problem is likely in the way .pl files are associated with the perl interpreter. It looks like at least on NT, you need to do:
ASSOC .pl=PerlScript FTYPE PerlScript=c:\path\to\perl.exe %1 %*
If you had forgotten the %* part, perl would never receive the additional arguments to pass to your script.. YMMV with Windows 2000, though.

blokhead

Replies are listed 'Best First'.
Re^2: Problem with @ARGV in Win32 Perl (nits)
by tye (Sage) on Jul 24, 2003 at 20:29 UTC

    Make that:

    FTYPE PerlScript=c:\path\t­o\perl.exe "%1" %*
    so that it works when clicking on Perl scripts who have spaces in their path/name. And that is correct for Win2k.

                    - tye
Re: Re: Problem with @ARGV in Win32 Perl
by nimdokk (Vicar) on Jul 24, 2003 at 20:27 UTC
    OK, that gives me a good idea what to fix. Thanks.


    "Ex libris un peut de tout"