summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-09-24 12:08:30 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-09-24 12:08:30 +0000
commitac3b20cba6ebb8d3db4980650c8b3c130416652b (patch)
treef2983327ae862601624396f2376e90cad14d9f1b /lib
parent9a7df4f2d158d129a2431038d4b082ffde8d4bfe (diff)
downloadperl-ac3b20cba6ebb8d3db4980650c8b3c130416652b.tar.gz
Clarifying comment to #12164.
p4raw-id: //depot/perl@12170
Diffstat (limited to 'lib')
-rw-r--r--lib/Cwd.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Cwd.pm b/lib/Cwd.pm
index 680fc3e56f..d86527f9e0 100644
--- a/lib/Cwd.pm
+++ b/lib/Cwd.pm
@@ -188,8 +188,9 @@ $pwd_cmd ||= 'pwd';
# The 'natural and safe form' for UNIX (pwd may be setuid root)
sub _backtick_pwd {
my $cwd = `$pwd_cmd`;
- # `pwd` may fail e.g. if the disk is full
+ # Belt-and-suspenders in case someone said "undef $/".
local $/ = "\n";
+ # `pwd` may fail e.g. if the disk is full
chomp($cwd) if defined $cwd;
$cwd;
}