#!/usr/bin/perl use strict; use warnings; use Benchmark("cmpthese"); cmpthese(-1, { "double", q !eval q {$a = "this is a string"}!, 'single', q !eval q {$b = 'this is a string'}!, }); #### Rate single double single 34133/s -- -1% double 34462/s 1% -- #### Rate double single double 33810/s -- -0% single 33811/s 0% --