http://qs1969.pair.com?node_id=1143934


in reply to Typo or on purpose? Variable instantiation with string concatenation operator

my $str1 .= $self->sanitizeString($input1);

will do the same thing as

my $str1 = $self->sanitizeString($input1);

but it makes no sense to use the former.

The benchmarks show no difference in speed. (Anything under 1% is definitely meaningless. I question anything under 5%. I used kennethk's code, but changed timethese to cmpthese to produce more useful output, and changed the label to something meaningful.)

Rate concat normal concat 771935/s -- -1% normal 779433/s 1% --