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

Re: Perl: in-line clip? (was Re: Three monitors (was Re: [NH] multiple heads and NoteTab))

Expand Messages
  • Piotr Bienkowski
    On 9 Nov 2001 at 18:28, Alec Burgess wrote: Hi Alec, ... First you select one line in NoteTab, and then only the selected text goes to your Perl script s STDIN
    Message 1 of 2 , Nov 9, 2001
      On 9 Nov 2001 at 18:28, Alec Burgess wrote:

      Hi Alec,

      > Next, is it possible to put together a quick perl script that
      > will
      > remove, modify and replace _one_ line? I do a lot of little editing
      > bits at a time and it is handy to have a keyboard macro/script that
      > will do this. Since I'm learning perl and working with it
      > periodically, it would be handy to have this capability.<<

      First you select one line in NoteTab, and then only the selected text
      goes to your Perl script's STDIN or <>

      Usually the while loop goes through the document line by line (line
      being a string that ends with CRLF), unless you change the $/ variable,
      e.g.:

      while (<>) {
      # your code here
      }

      > Related to Ron's question (maybe this should be on ntb-clips?)
      > Is there some way to create an in-line Perl-clip where all the code
      > required (whether clip-code or Perl-code) is contained in just ONE
      > clip.

      If having Clip and Perl code in one 'clip' is what you're after, I don't
      think it's possible.

      Regards,

      Piotr
    Your message has been successfully submitted and would be delivered to recipients shortly.