Mercurial > hg > Members > anatofuz > test_perl1_alpine
annotate perlsh @ 2:9f567da916dd default tip
cancel rev 1
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 13 Jun 2019 20:51:20 +0900 |
parents | 0240ed5457bb |
children |
rev | line source |
---|---|
0 | 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 | |
9 $/ = ''; # set paragraph mode | |
10 $SHlinesep = "\n"; | |
11 while ($SHcmd = <>) { | |
12 $/ = $SHlinesep; | |
13 eval $SHcmd; print $@ || "\n"; | |
14 $SHlinesep = $/; $/ = ''; | |
15 } |