X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/378cc40b38293ffc7298c6a7ed3cd740ad79be52..cbe56f1dc5efa2a32e6943a97f6928e7eef1b1f6:/perlsh diff --git a/perlsh b/perlsh index 4f9b5dd..63662d6 100644 --- 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 = $/; $/ = '';