C:\test>\perl22\bin\perl 1176081.pl -WIDTH=1000 -HEIGHT=1000 yr() took 2.551594 buk() took 1.068262 buk2() took 0.681494 buk3() took 0.167000 dave() took 0.127978 #### while( substr( $$str, $y * $WIDTH, $WIDTH ) =~ m[((.)\2*)]mg ) { ... #### my $ref = \substr( $$str, $y * $WIDTH, $WIDTH ); while( $$ref =~ m[((.)\2*)]mg ) {