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
An Englishman in New York
An American Werewolf in London
An American in Paris
The Innocents Abroad
An Idiot Abroad
Robinson Crusoe on Mars
A Connecticut_Yankee in King Arthur's Court
There and Back Again
Travels into Several Remote Nations of the World
Results (94 votes). Check out past polls.