funz has asked for the wisdom of the Perl Monks concerning the following question:
open (DATA,"$resolution"); @data = <DATA>; close(DATA); $data = "@data"; $data=~ m/.*&$FORM{'res'}\n/i; ($count, $res) = split(/&/, $&); @add = grep{ !(/.*&$res\n/i) } @data; $count++; push(@add, "$count&$res\n"); open (DATA,">$resolution"); print DATA @add; close(DATA);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Search and replace
by atcroft (Abbot) on Jun 14, 2004 at 04:33 UTC | |
by funz (Initiate) on Jun 14, 2004 at 06:18 UTC | |
by BUU (Prior) on Jun 14, 2004 at 06:53 UTC |