Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-24-2003, 09:00 PM   #1
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Rep: Reputation: 31
Perl script association

After trying to upgrade perl, I know have perl in 2 directories:




The script I'm wanting to run calls for Net::SNMP which is located in /usr/local/lib/perl5/5.8.2, but it's trying to pull up /usr/lib/perl5/5.8.0. So how do I change it so that it looks at the newer version rather then the older? I'm using Redhat 9.1. Thanks!

Old 11-25-2003, 08:21 AM   #2
Registered: Oct 2003
Location: Austin, TX
Distribution: RH 7.3, RH 9.0, FC4, Arch
Posts: 36

Rep: Reputation: 15
You _might_ be able to use rpm to remove the old perl. I don't know if other packages will require this. You can also do "find / -name perl -print" as root. Then run "/fullpath/perl -v" to get its version. My RH9 perl is in /usr/bin. Then make sure the script runs the version that you want or set your PATH to handle this.
Old 11-25-2003, 08:51 AM   #3
Registered: Nov 2003
Distribution: Mandrake 10.1/Solaris 10 (sparc)
Posts: 96

Rep: Reputation: 16
If you need both versions of perl, you can manually tell the script where to check for the Net::SNMP:

Right after #!/usr/bin/perl (or where ever your perl binary is):

unshift(@INC, "/usr/local/lib/perl5/5.8.2");


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
perl script Arnaud_B Linux - Newbie 13 07-31-2005 02:27 PM
Converting a Windows Perl script to a Linux Perl script. rubbercash Programming 2 07-19-2004 10:22 AM
bash script to set extension association vi0lat0r Programming 6 05-24-2004 07:04 PM
how to find the pid of a perl script from shell script toovato Linux - General 1 12-19-2003 06:25 PM
Including methods from a perl script into another perl script gene_gEnie Programming 3 01-31-2002 05:03 AM

All times are GMT -5. The time now is 03:00 AM.

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