This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Following change 27942 it's clear that the return type of
[perl5.git] / perlsh
CommitLineData
378cc40b
LW
1#!/usr/bin/perl
2
3# Poor man's perl shell.
4
5# Simply type two carriage returns every time you want to evaluate.
6# Note that it must be a complete perl statement--don't type double
7# carriage return in the middle of a loop.
8
faf8582f 9$/ = "\n\n"; # set paragraph mode
378cc40b 10$SHlinesep = "\n";
54310121 11while (defined($SHcmd = <>)) {
378cc40b
LW
12 $/ = $SHlinesep;
13 eval $SHcmd; print $@ || "\n";
14 $SHlinesep = $/; $/ = '';
15}