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

Re: [NTS] Re: [Clip] Basic tips on using Perl progs?

Expand Messages
  • Alec Burgess
    Hi Alan, Ian Alan: I tried it with both the straight substitution after putting bax the box car which got eaten by yahoo-groups. pl_ctrl_char: AFAICT: it eats
    Message 1 of 7 , Jul 8, 2005
    • 0 Attachment
      Hi Alan, Ian

      Alan:
      I tried it with both the straight substitution after putting bax the box car which got eaten by yahoo-groups.

      pl_ctrl_char:
      AFAICT: it eats the box char left before the closing <p> but then deposits its own *after* the closing <p>

      so *selectedtext* --> <p>*selectedtext*<boxchar><p> w/o pl_ctrl_char
      but *selectedtext* --> <p>*selectedtext<p>*<boxchar> with pl_ctrl_char

      Sherri's pl_ctrl_char:
      This works!!

      I'll have to start doing more with Perl scripts again. I think I like using a direct invocation of a script file rather than a two or three level script clip - makes testing easier.

      Ian: Using HTML-Tidy to get rid of the box char is ingenious :-) It doesn't even seem to generate an error-file, just gets rid of the box char.
      -- I'm glad you asked your question.

      Regards ... Alec
      --
      ; ( ) { } [ ] \ | 9 0 + = () {} []

      ----- Original Message -----
      From: Alan C
      To: ntb-scripts@yahoogroups.com
      Sent: Friday, July 08, 2005 02:34
      Subject: [gla: Re: [NTS] Re: [Clip] Basic tips on using Perl progs?


      Hi. 4 clips follow (U do not need to make a .pl file unless U want to)
      - I often do not use .pl file but instead do like the next 4 clips which
      I think is how it's done in samplecode library also.

      pl_ctrl_char2 might needed as the first one (without the 2) (2 is
      Shari's solution) , first 1 I pasted the actual box char which might not
      make it thru email.

      H="pl_ptagger"
      ^!RunPerl pl_ptagr
      ^!RunPerl pl_ctrl_char

      H="_pl_ptagr"
      while (<>) {
      print "<p>";
      print ;
      print "</p>";
      }

      H="_pl_ctrl_char"
      # rids of pesky box char 26 Ntab issue
      while (<>) {
      s/\//;
      print ;
      }

      H="_pl_ctrl_char2"
      while (<>) {
      if (eof && $] > 5.006) {
      $badchar = chr(26);
      s/($badchar)$//;
      }
      print ;
      # end



      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.