Michael G. Schwern [Sun, 13 Jan 2002 21:00:07 +0000 (16:00 -0500)]
Message-Id: <
20020114020007.GB2877@blackrider>
p4raw-id: //depot/perl@14253
unless(defined &cwd) {
# The pwd command is not available in some chroot(2)'ed environments
- if($^O eq 'MacOS' || grep { -x "$_/pwd" } split(':', $ENV{PATH})) {
+ if( $^O eq 'MacOS' || (defined $ENV{PATH} &&
+ grep { -x "$_/pwd" } split(':', $ENV{PATH})) )
+ {
*cwd = \&_backtick_pwd;
}
else {