Loading ...
Sorry, an error occurred while loading the content.

Re: faking an interactive perl interpreter

Expand Messages
  • Ryan King
    ... Or, to make it more OAOO-compliant: while (1) { print nperl% ; last unless defined ($_ = ); eval; warn $@ if $@; }
    Message 1 of 3 , Jan 31, 2001
    • 0 Attachment
      On Wed, Jan 31, 2001 at 11:59:31AM -0500, Dossy wrote:
      > print "\nperl% ";
      > while (<>) {
      > eval;
      > warn $@ if $@;
      > print "\nperl% ";
      > }

      Or, to make it more OAOO-compliant:

      while (1) {
      print "\nperl% ";
      last unless defined ($_ = <>);
      eval;
      warn $@ if $@;
      }
    Your message has been successfully submitted and would be delivered to recipients shortly.