in reply to Interpolation via return ..END...

So, you want to interpolate a result of a method call, right?

Here is one way to do it

#!perl -w use strict; use Number::Format; sub HTML_SomethingBetter { my $t = shift; my $d = new Number::Format (-thousands_sep => ',', -decimal_point =>' +.', -decimal_fill => 2); return <<END; <tr/td code> @{[$d->format_number($t->{key})]} </tr> END } print "<-- SomethingBetter -->\n"; print HTML_SomethingBetter { key => ' 3.1415956 ' }; __END__ <-- SomethingBetter --> <tr/td code> 3.14 </tr>
See also Effective Perl Programming item 58, where it is described as U.B.E.: Ugly But Effective.

My mnemonic for  @{[...]} is "All Embracing Bracketts"

Cheers
Rudif