Choosing the path based on the system "uname" command
- From: "doni" <doni.sekar@xxxxxxxxx>
- Date: 27 Feb 2007 11:49:52 -0800
Hi,
I want to write a program that does check the appropriate system path
for perl in FreeBSD and Linux.
The path where I have it in FreeBSD is
#! /usr/local/bin/perl
and the path where it is in Linux is
#! /usr/bin/perl
I wanted the program to check for the uname of the system and choose
the appropriate path. Can anyone tell me how can I have my program
check this.
This is how I wrote the program but it doesnt work.
#! /usr/local/bin/perl
use strict;
use warnings;
if (system("uname") eq "Linux") {
#! /usr/bin/perl
}
< rest of the code >
Thanks,
doni
.
- Follow-Ups:
- Re: Choosing the path based on the system "uname" command
- From: Ben Morrow
- Re: Choosing the path based on the system "uname" command
- From: Warren Block
- Re: Choosing the path based on the system "uname" command
- From: J. Gleixner
- Re: Choosing the path based on the system "uname" command
- From: Paul Lalli
- Re: Choosing the path based on the system "uname" command
- Prev by Date: Re: DocumentHTML ?
- Next by Date: Re: DocumentHTML ?
- Previous by thread: Disable warnings from specific module
- Next by thread: Re: Choosing the path based on the system "uname" command
- Index(es):
Relevant Pages
|