Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 429593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:47:26+00:00 2026-05-12T19:47:26+00:00

When I invoke my Perl scripts in the Windows environment without invoking perl first,

  • 0

When I invoke my Perl scripts in the Windows environment without invoking perl first, the parameters are not passed to my script.

For example,

C:\my-perl-scripts\foo.pl bar

invokes foo.pl, but it doesn’t recognize bar as a parameter (@ARGV is empty). However,

perl C:\my-perl-scripts\foo.pl bar

works as expected.

Is this a configuration issue?

Ideally, I’d like to be able to distribute some Perl scripts, have the user add C:\my-perl-scripts\ to the path and then just be able to invoke foo.pl from anywhere while running cmd.

If they have to specify perl first, then they’ll always have to give a complete path.

To show that the assoc and ftype are correct on my system, I executed the following commands.

assoc .pl

Output:

.pl=Perl

And

ftype Perl

Output:

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

And:

more t.pl

Output:

print "'$_'\n" for @ARGV;

And:

t a b
    perl t.pl a b

Output:

'a'
'b'

And (no output):

t.pl a b

I included both the output of t and t.pl to show it’s not a %PATHEXT% problem. Both outputted nothing as originally described whereas invoking perl first gave the expected response.

The problem appears to be on my vista business box. On my Windows XP Pro box, it works as expected. Both have ActivePerl 5.8.9. I have another Windows Vista Home box that I have not yet tried yet.

I found the answer (posted below). I found it by running a registry cleaner, removing the Perl installation, running the registry cleaner again. On the second cleaning, only one invalid entry remained—the one that was causing the problem (probably left over from a previous installation).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T19:47:27+00:00Added an answer on May 12, 2026 at 7:47 pm

    I found out what the problem was. Although the ftype and the assoc values were set as suggested, the actual behavior on my system seems to be determined by the registry key

    HKEY_CLASSES_ROOT\Applications\perl.exe\shell\open\command
    

    It should have a (Default) string value of "C:\Perl\bin\perl.exe" "%1" %*

    When I found this entry, it was set to "C:\Perl\bin\perl.exe" "%1". Changing it immediately fixed the problem.

    Why was it set that way in the first place? I don’t know. Maybe from a previous installation?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 231k
  • Answers 231k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use the following function like this: Image('/path/to/original.image', '1/1', '150*', './thumb.jpg');… May 13, 2026 at 2:13 am
  • Editorial Team
    Editorial Team added an answer Check you database schema to see if the field (referenced… May 13, 2026 at 2:13 am
  • Editorial Team
    Editorial Team added an answer I figured out the problem - there was a session… May 13, 2026 at 2:13 am

Related Questions

I'm programming in VB using Visual Studio 2005 Professional. I have a code munger
I have a YAML document like this: --- version: 1 rootdirectory: - subdirectory: -
I've got some strange behavioral differences between Python's subprocess.call() and os.system() that appears to
I wish to automatically enter a password while running an install script. I have

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.