This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
better .patchnum/.sha1 dependency stuff
[perl5.git] / perlsh
diff --git a/perlsh b/perlsh
index 2b2cccd..63662d6 100644 (file)
--- 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 = $/; $/ = '';