>>>>> "HvN" == Huub van Niekerk <[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
HvN> If you mean like this, it doesn't work.
HvN> $ENV{"lpr"} = "/usr/bin/lpr";
HvN> Nor do
HvN> $ENV{"/usr/bin/lpr"} = "lpr";
HvN> $ENV{"PATH"} = "/usr/bin/lpr";
i hate to be snarky, but guessing is not the way to become a good
programmer. maybe in 100 more tries you will get it.
do you know what the PATH means? this is the same for all common
OS's. it is a list (usually : separated) of directories to search for a
program. is /usr/bin/lpr a directory? what would $ENV{"lpr"} even mean?
is there some global value known to exec and other calls that is 'lpr'?
programming requires understanding of what things mean and their
relationships. before i give you another answer, please read perldoc
perlvar and see what it says about %ENV. also search google for unix
PATH and learn more about that. and also perldoc perlrun on -T and what
tainting is and how you work with it.
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/