Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

perl installed path in windows?

by Divakar (Sexton)
on Nov 23, 2011 at 14:26 UTC ( [id://939669]=perlquestion: print w/replies, xml ) Need Help??

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

Hi all,

How can we find perl installed path in windows? in unix, we give "which perl", "whereis perl". do we have same kind in windows?

Thanks & Regards,

Divakar

Replies are listed 'Best First'.
Re: perl installed path in windows?
by Corion (Patriarch) on Nov 23, 2011 at 14:29 UTC
Re: perl installed path in windows?
by BrowserUk (Patriarch) on Nov 23, 2011 at 16:08 UTC

    As Corion indicated, for perl, all you need is:

    C:\test>perl -E"say $^X" C:\Perl64\bin\perl.exe

    In general, you could use the following simple .cmd file:

    @echo off for %%i in (%1) do @echo %%~$PATH:i

    Which I call pf.cmd (for PathFinder), and use it like this:

    C:\test>pf perl.exe C:\Perl64\bin\perl.exe C:\test>pf msinfo32.exe C:\Windows\System32\msinfo32.exe C:\test>pf nmake.exe c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\nmake. +exe C:\test>pf tp.cmd C:\Perl64\bin\tp.cmd

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re: perl installed path in windows?
by raybies (Chaplain) on Nov 23, 2011 at 14:48 UTC
    I always just echo %PATH% and look for it in there. But I don't generally use the install path the way i do in linux, in windows, I'll invoke my scripts using "perl perlscript.pl (command-line-args)" in windows commandline...
Re: perl installed path in windows?
by MVS (Monk) on Nov 24, 2011 at 04:24 UTC

    You could also install File::Which, which includes a Perl-based version of 'which' called 'pwhich':

    C:\>pwhich perl C:\Apps\perl\bin\perl.EXE

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-16 18:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found