Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

open perl interpreter

by Anonymous Monk
on Aug 03, 2004 at 15:57 UTC ( #379718=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

All my perl file(interpreter and script) are in one folder. I would like to be able to move my folder anywhere in my hardisk. I know it make no sense, but I just want to know it. But the problem is how my script will find my perl interpreter in the same folder after I move the folder some where else( for example c:/perl to c:/desktop/perl)

Should I create an .exe file like this

system("??? "); so that the exe file will order perl interpreter to open

So how do I do that????


Replies are listed 'Best First'.
Re: open perl interpreter
by Grygonos (Chaplain) on Aug 03, 2004 at 16:12 UTC

    I'm not following what you mean,however I think I understand. So long as your new path to perl is in the PATH environment variable, invoking "perl" from the directory where is located should invoke the interpreter on

    Is this what your are getting at?
Re: open perl interpreter
by PodMaster (Abbot) on Aug 03, 2004 at 17:49 UTC
    print $^X,$/; system $^X,'-e','print $^X,$/' __END__ C:\Perl\bin\perl.exe C:\Perl\bin\perl.exe

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: open perl interpreter
by gawatkins (Monsignor) on Aug 04, 2004 at 03:26 UTC

    Although I am not exactly sure what your are looking for, I think that you need to have your PATH enviromental variable adjusted. To do this in 2000/XP you can right click on My Computer and Go to Properties. From Properties, select the advanced tab, then Environment Variables at the bottom. The top "User Variables" sets the path for the current profile while "System Variables" sets the path for all users. Select the Path variable in the appropriate section and click edit. Add a semicolon (;) to the end of the current content to separate and then type the full path to the location of perl.exe, for example, "c:\perl\bin"


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://379718]
Approved by integral
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2023-06-04 05:13 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (17 votes). Check out past polls.