Mercurial > hg > Members > anatofuz > test_perl1_alpine
view 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 |
line wrap: on
line source
#!/usr/bin/perl # Poor man's perl shell. # Simply type two carriage returns every time you want to evaluate. # Note that it must be a complete perl statement--don't type double # carriage return in the middle of a loop. $/ = ''; # set paragraph mode $SHlinesep = "\n"; while ($SHcmd = <>) { $/ = $SHlinesep; eval $SHcmd; print $@ || "\n"; $SHlinesep = $/; $/ = ''; }