#! /usr/bin/perl -w use strict; use Benchmark qw(:all); my $sample = 'abcdefghijklmnopqrstuvwxyz'; sub interpolated () { my $s = ''; for (0 .. 99) {$s = "$s$sample"} } sub noninterpolated () { my $s = ''; for (0 .. 99) {$s .= $sample} } cmpthese (-1, {interp => "interpolated()", nonint => "noninterpolated()"});