For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > February 2006 > perl









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author perl
octaviomachoso@gmail.com

2006-02-22, 7:56 am

I'm using ActiveState interpreter for windows. How can I run a script
automatically with paramters?
I've associated the .pl extention with perl.exe interpeter, but it
doesn't take parameters.

Paul Lalli

2006-02-22, 7:56 am

octaviomachoso@gmail.com wrote:
> I'm using ActiveState interpreter for windows. How can I run a script
> automatically with paramters?
> I've associated the .pl extention with perl.exe interpeter, but it
> doesn't take parameters.


This question seems to be coming up in this group about once per month.
Basically, there's a known problem with ActiveState Perl in that the
default file type association does not take command line arguments into
effect. Either run your script as:
perl file.pl arg1 arg2 arg3
instead of just
file.pl arg1 arg2 arg3

Or change your file association: in Windows Explorer, go to
Tools->Folder Options->File Types, find the .PL extension, and change
the advanced properties for open or run to:
"C:\Perl\bin\perl.exe" "%1" %*

Exactly as I've typed it above, including all quotes where they are.

Paul Lalli

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com