in reply to MS XP and ARGV

It's a known problem with the windows shell and file associations (its not just XP but NT and 2000 as well) - you will find that it will work fine if you run the program as 'perl test.pl one two three'. One solution is to use the progran 'pl2bat' that is included with ActivePerl, this will wrap your Perl program as a batch file which can be executed directly and which doesn't suffer from the ARGV problem.

/J\

Replies are listed 'Best First'.
Re: Re: MS XP and ARGV
by hsmyers (Canon) on Mar 05, 2002 at 13:47 UTC
    It may be a know problem, but not on my w2k box. I just ran this:
    #!/usr/bin/perl use strict; use warnings; for (@ARGV) { for (glob) { print $_,"\n"; } }
    and it worked as expected. The command line was 'pal.pl * web\*.pgn'.

    –hsm

    "Never try to teach a pig to sing…it wastes your time and it annoys the pig."
Re: Re: MS XP and ARGV
by ronrouth (Initiate) on Mar 05, 2002 at 17:19 UTC
    Thank you!

    That was the correct resolution.
    Running the script as "perl test.pl one two three"
    returned the correct values.