in reply to Is it possible to alter a flat file in memory?
Oruse Tie::File; tie my @fh, 'Tie::File', "yourfile" or die("ack - $!"); s/$ARGV[0]/$ARGV[1]/g for @fh;
perl -pi -e 's/THIS/THAT/g' yourfile
_________
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Is it possible to alter a flat file in memory?
by Limbic~Region (Chancellor) on May 21, 2003 at 23:12 UTC | |
by broquaint (Abbot) on May 21, 2003 at 23:38 UTC | |
by Limbic~Region (Chancellor) on Apr 12, 2006 at 14:50 UTC |