Paul, try modifying the "PATHEXT" environment variable to include .pl. (add a semicolon, followed by .pl)
To temporarily set it you can enter this at a command prompt: set PATHEXT=%PATHEXT%;.PL To set it permanently go into the control panel and the system applet. When you do this you don't even have to enter the .pl extension, just "test" is enough to run your script, and the parameters are properly passed. gerry ----- Original Message ----- From: "Paul Stepowski" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, May 23, 2004 5:54 PM Subject: Re: Passing command line options with ActivePerl > Hi Bill, > > Thanks, it work when I prefix it with "perl", e.g.: > > c:\>perl test.pl 1 2 > 1 > 2 > > C:\> > > Ideally I'd want to get around this so I only to type the name of the > script. Do you know if there's a way of confuring Windows to relay the > command line args if the program is called using a file extension (.pl) > association? > > Cheers, > > Paul > > > >From: "$Bill Luebkert" <[EMAIL PROTECTED]> > >To: Paul Stepowski <[EMAIL PROTECTED]> > >CC: [EMAIL PROTECTED] > >Subject: Re: Passing command line options with ActivePerl > >Date: Sun, 23 May 2004 14:36:34 -0700 > >MIME-Version: 1.0 > >Received: from mta10.adelphia.net ([68.168.78.202]) by mc3-f39.hotmail.com > >with Microsoft SMTPSVC(5.0.2195.6824); Sun, 23 May 2004 14:36:37 -0700 > >Received: from computer ([67.20.95.49]) by mta10.adelphia.net > >(InterMail vM.5.01.06.08 201-253-122-130-108-20031117) with SMTP > >id <[EMAIL PROTECTED]>; Sun, 23 > >May 2004 17:36:36 -0400 > >X-Message-Info: JGTYoYF78jGcU9AezkRD0YFt+einFfyL > >Message-ID: <[EMAIL PROTECTED]> > >User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) > >Gecko/20030624 Netscape/7.1 (ax) > >X-Accept-Language: en-us, en > >References: <[EMAIL PROTECTED]> > >In-Reply-To: <[EMAIL PROTECTED]> > >Return-Path: [EMAIL PROTECTED] > >X-OriginalArrivalTime: 23 May 2004 21:36:37.0585 (UTC) > >FILETIME=[06FDA410:01C4410E] > > > >Paul Stepowski wrote: > > > > > Hi, > > > > > > I've having trouble passing command line arguements to perl scripts > >written > > > in ActivePerl (v5.8.3). When I run the following script under linux, it > > > outputs my command line args as expected e.g.: > > > > > > ---snip--- > > > #/use/bin/perl > > > #test.pl > > > > > > foreach (@ARGV) { > > > print("$_\n"); > > > } > > > ---snip--- > > > > > > produces: > > > > > > # c:\test.pl 1 2 > > > 1 > > > 2 > > > # > > > > > > But the same script under ActivePerl doesn't, e.g > > > > > > ---snip--- > > > #!c:\ActivePerl\perl\bin\perl > > > #test.pl > > > > > > foreach (@ARGV) { > > > print("$_\n"); > > > } > > > ---snip--- > > > > > > C:\>test.pl 1 2 > > > > > > C:\> > > > > > > Does ActivePerl handle passing command line arguments differently? > > > >Try explicitly calling Perl (depending on which Windoze & shell, you may be > >able to properly associate Perl to .pl and getting the results you wanted) > >: > > > >perl test.pl 1 2 > > > >-- > > ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] > > (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] > > / ) /--< o // // Castle of Medieval Myth & Magic > >http://www.todbe.com/ > >-/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff) > > > > _________________________________________________________________ > SEEK: Now with over 50,000 dream jobs! Click here: > http://ninemsn.seek.com.au?hotmail > > _______________________________________________ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs