or download this
use Benchmark;
my @letters = qw (A B C D E F);
...
Benchmark: timing 1000 iterations of match, subst...
match: 10 wallclock secs ( 2.52 usr + 0.01 sys = 2.53 CPU) @ 39
+5.26/s (n=1000)
subst: 2 wallclock secs ( 1.88 usr + 0.01 sys = 1.89 CPU) @ 52
+9.10/s (n=1000)