summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/perlsh
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/perlsh')
-rw-r--r--gnu/usr.bin/perl/perlsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/usr.bin/perl/perlsh b/gnu/usr.bin/perl/perlsh
index 2b2cccd0641..63662d6c6a1 100644
--- a/gnu/usr.bin/perl/perlsh
+++ b/gnu/usr.bin/perl/perlsh
@@ -8,7 +8,7 @@
$/ = "\n\n"; # set paragraph mode
$SHlinesep = "\n";
-while ($SHcmd = <>) {
+while (defined($SHcmd = <>)) {
$/ = $SHlinesep;
eval $SHcmd; print $@ || "\n";
$SHlinesep = $/; $/ = '';