ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/staticperl/perl/perlsh
Revision: 1.1
Committed: Thu Jun 30 14:26:42 2005 UTC (21 years, 4 months ago) by root
Branch: MAIN
CVS Tags: PERL-5-8-7, HEAD
Branch point for: PERL
Log Message:
*** empty log message ***

File Contents

# Content
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 $/ = "\n\n"; # set paragraph mode
10 $SHlinesep = "\n";
11 while (defined($SHcmd = <>)) {
12 $/ = $SHlinesep;
13 eval $SHcmd; print $@ || "\n";
14 $SHlinesep = $/; $/ = '';
15 }