On Sep 11, 2007, at 10:05 PM, Gerald Wheeler wrote:

Correct

That can be done with a one-liner:

  perl -0777 -pi.bak -e '$_ = q{new text goes here}' *.txt

The options -p, -i, and -e are documented in perlrun. The flag -0777 has the side-effect of slurping the whole file into $_ (one file at a time), it is documented in perlrun as well, under -0.

-- fxn


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to