Re: How to develope wily?

  • From: "Ian Broster" <ianb@xxxxxxxxxxxxx>
  • To: wilyfans@xxxxxxxxxxxxx
  • Date: Fri, 01 Oct 2004 09:37:15 +0100


Sorry for being unclear.  I meant the Edit command in acme
that takes sam commands and apply them to the buffer.

Not at all, I haven't used acme/plan9 for too long!

I use perl do do something similar. I have a program 's'
which basically sed using the slightly more flexible perl
regexps.

I frequently use, e.g.

||s 's/hello/good bye/g;s/yes/no/i'

the double pipe is a modification I made that
means pipe the whole buffer i.e. :, then |

the argument can include arbitrary perl code of course,
it doesn't have to be a regexp, the code is executed once
per line.

Why cannot Edit be written like this?

#!/usr/bin/perl -w
my $reg=shift;

eval "
while (<>) { $reg;print;}
"
        

--
Dr. Ian Broster,
University of York.
Tel. +44 1904 432810

Other related posts: