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 4f9b5dd..63662d6 100644 (file)
--- a/perlsh
+++ b/perlsh
@@ -6,9 +6,9 @@
 # Note that it must be a complete perl statement--don't type double
 #  carriage return in the middle of a loop.
 
-$/ = '';       # set paragraph mode
+$/ = "\n\n";   # set paragraph mode
 $SHlinesep = "\n";
-while ($SHcmd = <>) {
+while (defined($SHcmd = <>)) {
     $/ = $SHlinesep;
     eval $SHcmd; print $@ || "\n";
     $SHlinesep = $/; $/ = '';