- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Which perl question
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2007 09:50 AM
тАО01-24-2007 09:50 AM
Which perl question
In hp-ux if i start a perl program like "#!/usr/local/bin/perl" and there is no /usr/local/bin/perl binary (or a link to binary), it will go on search my $PATH for perl and execute the program. If I try the same on my laptop (Linux) then it will inform me that there is no interpreter (no /usr/local/bin/perl- even though perl is in my path in /usr/bin) and halt ( which makes sense to me). Do you know why this is happening?
Thanks in advance : )
BR-s,
Alex
- Tags:
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2007 10:05 AM
тАО01-24-2007 10:05 AM
Re: Which perl question
In any event, generally the least evil approach that I have found is to shebang all perl scripts as:
#!/usr/bin/perl -w
on all platforms. Then for each platform, I create a symbolic link from the actual location to /usr/bin/perl, e.g.
ln -s /usr/local/bin/perl /usr/bin/perl
Once that link is created on each target platform, /usr/bin/perl works every time. This convention even works on Windowes because Windows doesn't observe the shebang convention and treats the line as a comment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2007 11:24 AM
тАО01-24-2007 11:24 AM
Re: Which perl question
To aid in locating your perl binary, you could do:
# whereis perl
Then, as Clay suggests, create any necessary symbolic link from '/usr/bin/perl' to the installed binary and use the standard link as your standard interpreter line.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-24-2007 07:23 PM
тАО01-24-2007 07:23 PM
Re: Which perl question
#!/usr/bin/env perl
Unfortunately it doesn't appear to let you put any arguments on that line.
- Tags:
- env
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2007 07:46 PM
тАО01-28-2007 07:46 PM
Re: Which perl question
so in the end i just made sure all systems had a link at the same place to the real location.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2007 05:01 AM
тАО01-29-2007 05:01 AM
Re: Which perl question
Cheers Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2007 05:10 AM
тАО01-29-2007 05:10 AM
Re: Which perl question
We're glad you have found help here. Please read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#28
Regards!
...JRF...