develooper Front page | perl.beginners | Postings from March 2002

executing filename with ~ in perl

Thread Next
From:
Roy Peters
Date:
March 27, 2002 11:01
Subject:
executing filename with ~ in perl
Message ID:
Pine.GSO.4.10.10203271256470.585-100000@sunq20
I have the following

$x = ~rambo/bin/script1; (where script1 is an executable shell script)

$ret = `x`;

The above will not work.

However if I define

$x = /home/apple/rambo/bin/script1; (ie I give a full pathname)

$ret = `x`;

This will work.

How do I make the first example work? By the way, I am on an unix machine



============================================================
The information contained in this message may be privileged 
and confidential and protected from disclosure.  If the 
reader of this message is not the intended recipient, or an 
employee or agent responsible for delivering this message to 
the intended recipient, you are hereby notified that any 
reproduction, dissemination or distribution of this 
communication is strictly prohibited. If you have received 
this communication in error, please notify us immediately by 
replying to the message and deleting it from your computer.

Thank you.
Tellabs
============================================================

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About