home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / p / perl4036.zip / os2 / perlsh.cmd < prev    next >
OS/2 REXX Batch file  |  1993-02-08  |  418b  |  20 lines

  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. }
  20.