Perl monking (was Menu{Master,Maestro,etc} question(s)
Jay R. Ashworth
jra at baylink.com
Thu May 10 06:57:46 PDT 2007
On Thu, May 10, 2007 at 09:53:57AM -0400, Fairlight wrote:
> I didn't test with -pi.bak so I can't authoritatively say.
>
> The man page said that -i edited in-place all lines passed through the <>
> operator. I would then surmise that if you don't use the <> operator, it's
> not done. I just haven't tested the theory. Your version as I recall it
> did not seem to actually -take- the input from STDIN or a file, although I
> could be misremembering (it's not in front of me).
I read it as "if you use -i, then your -e commands will be used as the
target of
while (<>) {};"
IE: it automagically does all the context for you, like awk, and all
you have to do it write the body of the loop. I'm gonna test it in
about 10 minutes, so I'll know. The only thing that might be a problem
is that in -i mode, there may be no way to get the shifts *out* of the
loop, which would, I think, be fatal.
Cheers,
-- jra
--
Jay R. Ashworth jra at baylink.com
Designer Baylink RFC 2100
Ashworth & Associates The Things I Think '87 e24
St Petersburg FL USA http://baylink.pitas.com +1 727 647 1274
More information about the Filepro-list
mailing list