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