Re: Choosing the path based on the system "uname" command
- From: Warren Block <wblock@xxxxxxxxxxx>
- Date: Tue, 27 Feb 2007 21:39:58 -0000
doni <doni.sekar@xxxxxxxxx> wrote:
I want to write a program that does check the appropriate system path
for perl in FreeBSD and Linux.
Why?
The path where I have it in FreeBSD is
#! /usr/local/bin/perl
Look for other links:
% which perl
/usr/bin/perl
% uname -smr
FreeBSD 6.2-STABLE i386
If you installed Perl from ports, /usr/bin/perl should be there.
I wanted the program to check for the uname of the system and choose
the appropriate path.
Not a good way to check, since it could be anywhere. which or whereis
would be better.
Can anyone tell me how can I have my program
check this.
chomp(my $perlpath = `which perl`);
print "path to perl is $perlpath\n";
--
Warren Block * Rapid City, South Dakota * USA
.
- References:
- Prev by Date: Re: Question about scoping
- Next by Date: Re: Perl threads - capturing value returned from sub
- Previous by thread: Re: Choosing the path based on the system "uname" command
- Next by thread: Re: Choosing the path based on the system "uname" command
- Index(es):
Relevant Pages
|