#!/usr/bin/perl use strict; use warnings; use Benchmark("cmpthese"); my $i = 1; cmpthese(-1, { "double", q !eval q {$a = "this is a string $i"}!, 'single', q !eval q {$b = 'this is a string $i'}!, });