Commit | Line | Data |
---|---|---|
ca2dddd6 C |
1 | extproc perl -x |
2 | #!perl | |
3 | ||
4 | # Poor man's perl shell. | |
5 | ||
6 | # Simply type two carriage returns every time you want to evaluate. | |
7 | # Note that it must be a complete perl statement--don't type double | |
8 | # carriage return in the middle of a loop. | |
9 | ||
10 | print "Perl shell\n> "; | |
11 | ||
12 | $/ = ''; # set paragraph mode | |
13 | $SHlinesep = "\n"; | |
14 | ||
15 | while ($SHcmd = <>) { | |
16 | $/ = $SHlinesep; | |
17 | eval $SHcmd; print $@ || "\n> "; | |
18 | $SHlinesep = $/; $/ = ''; | |
19 | } |