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

316Re: text processing with a Perl script

Expand Messages
  • Alec Burgess
    Aug 6, 2005

      Looks like you replied to me personally, rather than via the clips-list.
      I'm sending this reply back via the scripts list but copying you in case you are not yet on it.

      Please join at http://groups.yahoo.com/group/ntb-scripts/ if you've got further questions for Alan, he knows much more than I do.

      I'm really not trying to give you the runaround wrt. clips-list vs. scripts-list vs. personal reply, but any of the clips list people who are interested/know anything about Perl are already on the scripts list while the majority could care less about Perl and this is already way deeper than their or my understanding :-(

      Should I merge his with yours to make it work?
      No ... I think what he provided does everything I was trying to get across. Mine was just an example of something that *could* run. In my clip library I'd kept the H="_use with directPerl above" to remind myself of required syntax needed in an external perl .pl script file - its usually months between attempts to use perl and I've got a lousy memory.

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

      ----- Original Message -----
      From: H Tao
      To: Alec Burgess
      Sent: Saturday, August 06, 2005 16:42
      Subject: [gla: Re: (Ntb) text processing with a Perl script -

      Hello, Alec. Alan Cumming provides the following codes. Should I merge his with yours to make it work? I'm really new to this so your patience is much appreciated. -Ling

      H=";Run Perl"
      if ($i==$opt_m){goto L;}
      die $usage unless scalar(@ARGV)>1;
      $SearchPattern = shift;
      ^!RunScript $getperlexe$ file_path/kwic search_word ^**
      ^!Set %curdoc%=^**
      ^!Toolbar "new document"
      ^!Insert $GetDosOutput($getperlexe$ file_path/kwic search_word


      H="direct Perl"
      ^!Runscript perl C:\perl\bin\kwic.pl
      ^!replace "" >> "" wsait

      H="_use with directPerl above"
      undef $/; # Enter "file slurp" mode
      while (<>) {
      s /((.*\n)+)/<p>$1<\/p>/;

      [Non-text portions of this message have been removed]