Jan Eden wrote on 01.05.2004:

>Hi all,
>
>I wrote a little form mail script and start by setting the
>environment variables like this:
>
>BEGIN {
>$ENV{PATH} = "/usr/sbin"; delete @ENV{ qw( IFS CDPATH ENV BASH_ENV)
>};
>}
>
>Now the actual directory (.) is obviously not searched anymore,
>since
>
>my $page_head = eval do('page_head.pl');
>
>returns an empty $page_head while
>
>my $page_head = eval do('./page_head.pl');
>
>fills it with the appropriate content.
>
>Commenting the BEGIN block above and printing $ENV{PATH} gives me:
>
>/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec:/System/Library/
>/CoreServices
>
>I cannot see the current working directory in that list (but I admit
>that I am not used to environment variables at all).
>
>Can someone tell me how to restrict $ENV{PATH} but keep the script's
>ability to see something in its own directory?

Please let me add that I did try to set $ENV{PATH} = ".:/usr/sbin".

That did not work either.

- Jan
-- 
The day Microsoft makes something that doesn't suck is the day they start selling 
vacuum cleaners.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to