>>>>> "O" == Owen <[email protected]> writes:
>>> there is no %PATH variable in perl. if you read the post about
>>> clearing
>>> the PATH in the ENVIRONMENT, you would just set that value in the
>>> %ENV
>>> hash.
>>>
>>> uri
>>
>> If you mean like this, it doesn't work.
>>
>> $ENV{"lpr"} = "/usr/bin/lpr";
>>
>> Nor do
>>
>> $ENV{"/usr/bin/lpr"} = "lpr";
>> $ENV{"PATH"} = "/usr/bin/lpr";
>>
>> Thanks for helping out.
>>
O> Forget about the $ENV{....}
that is not correct. you can set the env PATH explicitly and use it to
find programs under taint.
O> In your command, where you have lpr
O> replace that with /usr/bin/lpr
and that isn't portable.
O> You will generally find that all commands need the full path
only if you want hardwired paths for all system/exec/backtick calls.
uri
--
Uri Guttman ------ [email protected] -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/