print "Good\n" if $test =~ ab;
####
#!/usr/bin/perl -w
use strict;
use Benchmark;
my $test;
#print "Good\n" if $test =~ ab;
timethese(-15, {
bare => '$test = "aba"; $test =~ ab',
delimited => '$test = "aba"; $test =~ /ab/'
});
####
Unquoted string "ab" may clash with future reserved word at (eval 1) line 1.
####
Benchmark: running bare, delimited, each for at least 15 CPU seconds...
bare: 13 wallclock secs (15.01 usr + 0.00 sys = 15.01 CPU) @ 457834.84/s (n=6872101)
delimited: 16 wallclock secs (15.00 usr + 0.00 sys = 15.00 CPU) @ 458124.53/s (n=6871868)