home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / M / MacPerl 4.13 source.sit / Perl Source ƒ / Perl / perlsh < prev    next >
Encoding:
Text File  |  1993-10-23  |  387 b   |  16 lines  |  [TEXT/MPS ]

  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 ($SHcmd = <>) {
  12.     $/ = $SHlinesep;
  13.     eval $SHcmd; print $@ || "\n";
  14.     $SHlinesep = $/; $/ = '';
  15. }
  16.