How to know the program 'perl' is installed ?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to know the program 'perl' is installed ?
# 1  
Old 12-11-2005
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
/usr/opt/PERL5004/bin/perl

But when I type 'whereis perl', a line showing:
perl: /usr/bin/perl /usr/share/man/man1/perl.1.gz

Then I type 'perl' in the command prompt. It have no response.
Is this mean the perl is installed on the system?

Thk a Lot!
# 2  
Old 12-11-2005
From your description, it seems like perl is installed.

Just typing "perl" without anything else will drop you into immediate line entry mode - that lets you enter Perl code line by line for execution when you hit Ctrl-D (end-of-file).

A better way to test if Perl is there is to type "perl -v" that it will output the Perl version and quit, without keeping you in the line entry mode.
# 3  
Old 12-12-2005
Yes, when I type perl -v a list of message is appeared.
I think perl is installed on my system.

thk a lot
# 4  
Old 12-13-2005
Rather than using "find" to see if a program is installed, it's far better to use the builtin package query tools to see if it's been installed....

# RPM based linux distros....
rpm -qa | grep -i perl

# Solaris
pkginfo | grep -i perl

Of course, if you've built from source or installed in some non-standard way you cannot rely on the package query tools and then you would have to resort to 'find'.

Cheers
ZB
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl program get a response before the program quits

I created a program, so a kid can practice there math on it. It dispenses varies math problems and the kid must input an answer. I also want it to grade the work they have done, but I can't find the best place for it to print out the grade. I have: if ( $response =~ m/^/ ) { $user_wants_to_quit... (1 Reply)
Discussion started by: germany1517
1 Replies

2. 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

3. UNIX for Dummies Questions & Answers

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,... (4 Replies)
Discussion started by: Divakar
4 Replies

4. Ubuntu

How to list my program or package that i compile and installed?

Hi I would like to ask in ubuntu or linux on how to list all my package or software the i installed via source code( compile installed in dir default is /usr/local) just like i solaris in which if you installed a package in ur choosing default root installation dir you can just issue a command... (2 Replies)
Discussion started by: jao_madn
2 Replies

5. Homework & Coursework Questions

Calling compiled C program with Perl program

Long story short: I'm working inside of a Unix SSH under a bash shell. I have to code a C program that generates a random number. Then I have to call the compiled C program with a Perl program to run the C program 20 times and put all the generated random #s into a text file, then print that text... (1 Reply)
Discussion started by: jdkirby
1 Replies

6. HP-UX

how to package my program which can be installed on HP UX

I develop a unix program in HPUX I want to package my program to install on HPUX in some dierctory folder like /user/local/sbin/xxx and preinstall some software before install my program package like xxx.depot how can i do it, have any tools like use setupfactory tools in windows ... (4 Replies)
Discussion started by: alert0919
4 Replies

7. Shell Programming and Scripting

Checking whether program is installed

I currently use this construction to check whether a certain program is installed: if ; then cd /usr/ports/databases/sqlite3 && make install clean else echo "sqlite already installed" fi Is this method recommended? Is this an effective method, ie sufficiently robust for... (3 Replies)
Discussion started by: figaro
3 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. Shell Programming and Scripting

Which version of perl is installed on my system?

Hi, With the command perl -v i can see the perl version, but it's like a text file.. is there a command which could give me just the perl version number? i.e.: "5.8.1" thanks!! (6 Replies)
Discussion started by: kfad
6 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