How to find perl installed path?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to find perl installed path?
# 1  
Old 11-20-2011
How to find perl installed path?

Hi all,

how do we find where perl is installed via command line?

Please let me know for both windows and unix platforms.

when i tried in windows by following option. it is throwing error.

C:\Users\dkanagar>whereis perl
'whereis' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\dkanagar>whence perl
'whence' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\dkanagar>which perl
'which' is not recognized as an internal or external command,
operable program or batch file.

Thanks & Regards,
Divakar
# 2  
Old 11-22-2011
Hi,

on linux platforms you can try (as root):
# updatedb

then as your user:
$ locate perl

warning, this command can return a lot of lines, so you'd better pipe the output to 'more'.

One of the usual installation path may be something like /usr/bin/perl, let's assume this is the case for you from now on.

To check if the command 'perl' in the path '/usr/bin' is actually the perl executable, you can try the following command:
$ /usr/bin/perl -e 'print join "\n", @INC'
if the path is correct, you should see in output the list of perl modules currently installed.

Once you have identified the correct path, you can add it to your user's PATH (i.e. if you're using bash shell, edit your .bash_profile and add the path /usr/bin to PATH, like: PATH=$PATH:/usr/bin).

see ya
fra
# 3  
Old 11-22-2011
Hi,

bash-3.00$ locate
bash: locate: command not found

$ echo $SHELL
/bin/sh
$ locate
locate: not found.

$ which perl
/bin/perl

$ whereis perl
perl: /usr/bin/perl /usr/man/man1/perl.1

couldnt fine locate command. but i could find the path by using the above commands in unix.

in windows how do we find like above?

Thanks & Regards,
Divakar
# 4  
Old 11-22-2011
Quote:
in windows how do we find like above?
This forum is not a Windows forum. Having said that, typically the Perl executable should be on the Path environmental variable. Type PATH to see the Path.
# 5  
Old 11-23-2011
On UNIX systems sometimes the Path is set in the .profile file in your home directory, and runs anytime you log in. Check your .profile (it is hidden so you will not be able to see it with ls) just navigate to your home directory "cd ~" (without quotes) and type "cat .profile" (also without quotes). There may be a small script that sets the path.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Bash find version of an installed application but if none is found set variable to App Not Installed

Hello Forum, I'm issuing a one line bash command to look for the version of an installed application and saving the result to a variable like so: APP=application --version But if the application is not installed I want to return to my variable that the Application is not installed. So I'm... (2 Replies)
Discussion started by: greavette
2 Replies

2. Solaris

Finding the path to an executable , installed package

Hi all, Recently i wanted to see if i have openssl installed in my system (solaris 10), so i do this (not sure if this is the right way to do this) pkginfo -i | grep -i "ssl" system SUNWopenssl-commands OpenSSL Commands (Usr) system SUNWopenssl-include ... (3 Replies)
Discussion started by: javanoob
3 Replies

3. UNIX for Advanced & Expert Users

perl and HP-UX : instmodsh in combination with software depot : update inventory for installed Perl

we create a HP-UX software depot with a new perl-modul. after installation of the software depot, the perl module i can't find with instmodsh in the inventory for installed Perl modules. - i have learned of using instmodsh command : i find out what modules are already installed on my system. ... (0 Replies)
Discussion started by: bora99
0 Replies

4. AIX

how to know if my aix have multi-path driver installed?

I have an aix server, it is not a VIO server or client. I need to check if it has multi-path driver installed, how to check it? (1 Reply)
Discussion started by: rainbow_bean
1 Replies

5. UNIX for Dummies Questions & Answers

CVS installed path

Hi, How to find the CVS installed location on Solaris machine. ~Vinodh' Kumar ---------- Post updated at 01:14 PM ---------- Previous update was at 12:36 PM ---------- I got the solution. (2 Replies)
Discussion started by: vino_hymi
2 Replies

6. UNIX for Dummies Questions & Answers

How to find about NICs installed

Hi; Is there a way to determine for sure how many NIC ports installed on my Linux box? I tried to run "lspci" but not sure about the results, it's not clear. Below are the results when i run both "ifconfig" & "lspci" on my Linux box i hope someone can help me finding the actual numbers of... (1 Reply)
Discussion started by: Katkota
1 Replies

7. Shell Programming and Scripting

How to find out which sql i have installed .

I use CentOS . I want to know how to find out which sql i have installed .. Can anyone tell .. (2 Replies)
Discussion started by: madhumathikv
2 Replies

8. AIX

Perl installed by default?

Hi all, I wanted to know if Perl comes installed by default on AIX 5.2 and 5.3. I know it's available through the Linux affinity toolbox, but couldn't figure out if it's installed by default along with the RPM (rpm.rte). Does anyone know for sure? Thanks, JP (4 Replies)
Discussion started by: jbeaudry
4 Replies

9. UNIX for Dummies Questions & Answers

How to know the program 'perl' is installed ?

Hi, How can I know the perl interpreter is installed in the system? When I type 'find / -name perl -print 2>/dev/null', there is 6 lines listing: /usr/local/bin/perl /usr/bin/perl /usr/lib/perl-5.8.0/bin/perl /usr/opt/IAFW310/PERL/perl /usr/opt/IAFW310/PERL/t/perl... (3 Replies)
Discussion started by: zp523444
3 Replies

10. Shell Programming and Scripting

How to check if perl is installed?

Hi, i'm designing a unix script and i want to know if there is a shell command or a way to see if perl is installed in the system. thanks in advance! (5 Replies)
Discussion started by: kfad
5 Replies
Login or Register to Ask a Question