#!/usr/local/bin/perl5.8.0 or #!/usr/local/bin/perl5.6.1 use Benchmark; $main::x=join("",(a..z))x100; &timethis(100,\&test); sub test { $main::x =~ s/(.*?)I/$1/isge; } #### Perl 5.8.0 timethis 1000: 48 wallclock secs (46.76 usr + 0.02 sys = 46.78 CPU) @ 21.38/s (n=1000) Perl 5.6.1 timethis 1000: 1 wallclock secs ( 0.70 usr + 0.00 sys = 0.70 CPU) @ 1428.57/s (n=1000) #### Setting an EVAL scope, savestack=12 24 | 1: OPEN1 24 | 3: MINMOD 24 | 4: STAR Setting an EVAL scope, savestack=12 failed... Setting an EVAL scope, savestack=12 25 | 1: OPEN1 25 | 3: MINMOD 25 | 4: STAR Setting an EVAL scope, savestack=12 failed... Setting an EVAL scope, savestack=12 26 <> | 1: OPEN1 26 <> | 3: MINMOD 26 <> | 4: STAR Setting an EVAL scope, savestack=12 failed... Match failed #### SANY can match 1 times out of 1... 23 | 6: CLOSE1 23 | 8: EXACTF failed... SANY can match 1 times out of 1... 24 | 6: CLOSE1 24 | 8: EXACTF failed... SANY can match 1 times out of 1... 25 | 6: CLOSE1 25 | 8: EXACTF failed... SANY can match 1 times out of 1... 26 <> | 6: CLOSE1 26 <> | 8: EXACTF failed... SANY can match 0 times out of 1... failed... Match failed