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

201Re: [NTS] Perl 5.8 vs. Notetab

Expand Messages
  • Sheri
    Apr 3, 2003
    • 0 Attachment
      At 11:01 AM 4/3/03 -0500, I wrote:

      >The best I've come up with so far is to add this inside to the "while (<>)" loop of each of my Perl scripts that are fed by ^!RunPerl or ^!RunScript:
      >
      >if ($] > 5.006) {
      > $badchar = chr(26);
      > s/($badchar)$//;
      >}
      >
      >But that way it runs on each input unit (e.g., line or paragraph) instead of just the last one (which would be more appropriate). I guess it doesn't matter, but I would like to know how to apply it to the last unit only.

      Found a way to apply it to the last record only, but still interested in better ideas:

      if (eof && $] > 5.006) {
      $badchar = chr(26);
      s/($badchar)$//;
      }

      Regards,
      Sheri
    • Show all 4 messages in this topic