sub Ref { my $Str = q{ # Here follows the same 100K of ASCII data }; \$Str; } timethese(10000, { Ref => q{ my $R = Ref() } }); Benchmark: timing 10000 iterations of Ref... Ref: 9 wallclock secs (10.50 usr + 0.00 sys = 10.50 CPU)