LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 07-05-2007, 10:53 AM   #1
neolithic_psyche
Member
 
Registered: May 2007
Posts: 32

Rep: Reputation: 15
Unhappy Where can I locate my perl interpreter?


I've just installed FC6 on my PC and I installe dperl along with it. I checked this using perl -v. I'm not able to find the perl interpreter! I tried giving the default #!/usr/local/bin/perl but it says the interpreter isn't there. How can I find the right path?
 
Old 07-05-2007, 10:55 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Code:
which perl
EDIT: oh yeah, the above works only if perl is somewhere in your PATH variable, so your shell finds it (in that case it launches when you type 'perl' and hit enter). If it's not, use one of these instead:
Code:
locate perl
find / -name perl
Note that before 'locate' you may need to update the search database with 'updatedb' command, if it's too old.

Last edited by b0uncer; 07-05-2007 at 10:57 AM.
 
Old 07-05-2007, 10:55 AM   #3
apeculiaz
LQ Newbie
 
Registered: Nov 2005
Distribution: Previously red hat,fedora,gentoo,debian; Currently,ubuntu,cygwin,mandriva
Posts: 14

Rep: Reputation: 0
Try "whereis perl"
 
Old 07-05-2007, 11:06 AM   #4
neolithic_psyche
Member
 
Registered: May 2007
Posts: 32

Original Poster
Rep: Reputation: 15
Thanks!

'whereis perl' worked just fine it was in the usr/bin/perl directory and not usr/local/bin/perl
 
Old 07-05-2007, 11:11 AM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
If you are scripting, you can do
Code:
#/usr/bin/env perl
This way, you do not have to know where exactly perl is installed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rename perl interpreter cramer Programming 6 08-01-2006 10:38 PM
vmware, any-any-update bad perl interpreter maxie Linux - Software 5 06-27-2006 07:12 PM
perl interpreter for smake NonSumPisces Linux - Software 0 06-04-2004 04:58 PM
does Perl interpreter come with red hat rhuser Linux - Software 1 02-17-2003 04:20 PM
perl: bad interpreter: Permission denied bulliver Linux - Software 4 01-27-2003 03:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration