X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/faf8582f0c418b57fd71e105da84edbb3177fa0c..5c99b74dc9de7d22f41ca6ea0da3c9ce14cd34e0:/perlsh diff --git a/perlsh b/perlsh index 2b2cccd..63662d6 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 = $/; $/ = '';