Martin Melichar
Martin Melichar

Reputation: 1156

How can I simply use one perl script in any folder?

I have just added this script to PATH variable, but it does not work.

I need to use it in any directory as:

perl script.pl SOME ARGUMENTS

I have windows 7 Ultimate.

Thank you for advices!

Upvotes: 0

Views: 43

Answers (1)

ikegami
ikegami

Reputation: 385657

While the system is using PATH to find the program to run, the system is executing perl, not script.pl.

Either tell perl to search PATH for the script,

perl -S script.pl SOME ARGUMENTS

Or launch the script directly.

script.pl SOME ARGUMENTS

Windows will use file associations to determine how to launch the file in the latter case.

Upvotes: 2

Related Questions