in reply to Re: Word replace - notetab light vs perlin thread Word replace - notetab light vs perl
Did you mean the following?
$start = new Benchmark;
open(FH, "wrongs") or die $!;
open(FH2, ">wrongs2") or die $!;
$lines = <FH>;
$counted2 = $lines =~ s/wrongs/wrongs4/g;
print FH2 "$lines";
$/ = "\n";
$end = new Benchmark;
# calculate difference
$diff = timediff($end, $start);
print "replaced: $counted2 The operation took: " , timestr($diff, 'all
A drawback of such optimization - no-one now can improve that code, because it is highly complicated.
Well, this is not the only place on where perl has good speed abilities.
Courage, the Cowardly Dog
Electric eels were invented at the same time as electricity
Before electricity was invented, electric eels had to stun with gas
Results (389 votes). Check out past polls.