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!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
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
3. AIX
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
4. Shell Programming and Scripting
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
5. 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
6. Homework & Coursework Questions
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
7. Ubuntu
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
8. UNIX for Dummies Questions & Answers
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
9. UNIX for Advanced & Expert Users
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
10. Shell Programming and Scripting
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
LEARN ABOUT REDHAT
findbin
FindBin(3pm) Perl Programmers Reference Guide FindBin(3pm)
NAME
FindBin - Locate directory of original perl script
SYNOPSIS
use FindBin;
use lib "$FindBin::Bin/../lib";
or
use FindBin qw($Bin);
use lib "$Bin/../lib";
DESCRIPTION
Locates the full path to the script bin directory to allow the use of paths relative to the bin directory.
This allows a user to setup a directory tree for some software with directories <root>/bin and <root>/lib and then the above example will
allow the use of modules in the lib directory without knowing where the software tree is installed.
If perl is invoked using the -e option or the perl script is read from "STDIN" then FindBin sets both $Bin and $RealBin to the current
directory.
EXPORTABLE VARIABLES
$Bin - path to bin directory from where script was invoked
$Script - basename of script from which perl was invoked
$RealBin - $Bin with all links resolved
$RealScript - $Script with all links resolved
KNOWN ISSUES
If there are two modules using "FindBin" from different directories under the same interpreter, this won't work. Since "FindBin" uses
"BEGIN" block, it'll be executed only once, and only the first caller will get it right. This is a problem under mod_perl and other persis-
tent Perl environments, where you shouldn't use this module. Which also means that you should avoid using "FindBin" in modules that you
plan to put on CPAN. The only way to make sure that "FindBin" will work is to force the "BEGIN" block to be executed again:
delete $INC{'FindBin.pm'};
require FindBin;
KNOWN BUGS
If perl is invoked as
perl filename
and filename does not have executable rights and a program called filename exists in the users $ENV{PATH} which satisfies both -x and -T
then FindBin assumes that it was invoked via the $ENV{PATH}.
Workaround is to invoke perl as
perl ./filename
AUTHORS
FindBin is supported as part of the core perl distribution. Please send bug reports to <perlbug@perl.org> using the perlbug program
included with perl.
Graham Barr <gbarr@pobox.com> Nick Ing-Simmons <nik@tiuk.ti.com>
COPYRIGHT
Copyright (c) 1995 Graham Barr & Nick Ing-Simmons. All rights reserved. This program is free software; you can redistribute it and/or mod-
ify it under the same terms as Perl itself.
perl v5.8.0 2002-06-01 FindBin(3pm)