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?

Thanks,

Jan
-- 
If all else fails read the instructions. - Donald Knuth

--
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