Issues runnign scripts under XP with ActivePerl 5.6

Posted on 2006-04-12
Last Modified: 2010-03-05
I've installed ActivePerl 5.6 on Windows XP Pro SP1, and it sort of works.  If I run a script from the command prompt, then the script doesn't pick up the arguments passed from the command line, however, if I preface the script with "perl", then it runs (well, until it hits another script called from this script...):

I created a simple script to test, and found that the arguments simply don't get passed:

print 'Hello';
print $ARGV[0];

C:\GKN>perl A

The package installed without error. My PATH environment variable is:

C:\Perl\bin\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\WINNT\system32\nls;C:\WINNT\system32\nls\ENGLISH;C:\Program Files\QuickTime\QTSystem\

and PATHEXT is:


Any ideas as to what is going on here? It's driving me nuts! :-)

Question by:Duncan Meyers
    LVL 28

    Accepted Solution

    You need to adjust the .pl file association and "tell it" to "look for" the arguments.

    Tools > Folder Options > File Types
    Locate the .PL extention and modify it this:

    "C:\Perl\bin\perl.exe" "%1" %*
    LVL 28

    Expert Comment

    It's possible that you don't have a .PL extension configured in the file types.  If that's the case, then clickon the "New" tab in the 'File Types' dialog box and create a file association giving the line I posted as the application to use for the 'Open' action .
    LVL 30

    Author Comment

    by:Duncan Meyers
    >"C:\Perl\bin\perl.exe" "%1" %*

    Bingo! That was it. The .PL file extension was associated, but instead of the Advanced button I'd normally expect to see under Tools>Folder Options>File Types, I had a Restore button in its place. I clicked on it, then the Advanced button returned and I could then confirm that the Application Used... string was correctly set.

    Thanks! You're my hero!


    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    perl to mysql 5 124
    cpan issue 1 45
    rename outfile before writing 2 64
    PERL variable conundrum 9 75
    There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
    Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now