CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: How to Get Perl to Automatically Look in Specific Directories for Scripts?: Edit Log



WingedKnight
Novice

Sep 15, 2016, 6:37 PM


Views: 18365
How to Get Perl to Automatically Look in Specific Directories for Scripts?

I have ActiveState Perl installed on a Windows machine.

Now, suppose I have scripts, including one called "SomeScript.pl", in this directory:


Code
"C:\Example\Foo\Bar\"


How do I configure Perl to automatically look in that directory for scripts when it is passed a script path?

For example, from the command line, I can run...:


Code
perl C:\Example\Foo\Bar\SomeScript.pl


...just fine.

But the following...:


Code
perl SomeScript.pl


fails because Perl doesn't know to look in the "C:\Example\Foo\Bar\" directory. How do I configure Perl to automatically look in some specific directory for scripts when passed a script name from the command line?


(This post was edited by WingedKnight on Sep 16, 2016, 12:12 AM)


Edit Log:
Post edited by WingedKnight (Novice) on Sep 15, 2016, 11:51 PM
Post edited by WingedKnight (Novice) on Sep 16, 2016, 12:12 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives