<?xml version="1.0" encoding="windows-1252"?>
<node id="497954" title="Re^2: Word replace - notetab light vs perl" created="2005-10-06 11:02:32" updated="2005-10-06 07:02:32">
<type id="11">
note</type>
<author id="89333">
kiat</author>
<data>
<field name="doctext">
Thanks, [Courage] :)&lt;p&gt;
Did you mean the following?
&lt;code&gt;
use Benchmark;
$start = new Benchmark;

open(FH, "wrongs") or die $!;
open(FH2, "&gt;wrongs2") or die $!;
undef $/;
$lines = &lt;FH&gt;;
$counted2 = $lines =~ s/wrongs/wrongs4/g;
print FH2 "$lines";
$/ = "\n";
close (FH);
close (FH2);
$end = new Benchmark;

# calculate difference
$diff = timediff($end, $start);
print "replaced: $counted2 The operation took: " , timestr($diff, 'all');
&lt;/code&gt;</field>
<field name="root_node">
497648</field>
<field name="parent_node">
497946</field>
</data>
</node>
