[Templates] Push a list

Andy Wardley abw@wardley.org
Wed, 1 Feb 2006 07:48:26 +0000


Bill Moseley wrote:
>   'push'    => sub { my $list = shift; push(@$list, @_); return '' },

Good idea.  I guess it should have been like that all along.  Thanks.
I've done the same for unshift, too.

> Any way to do anonymous join? ;)
>
>     ['one', 'two', 'three'].join('+');

Not until TT3 :-(

http://template-toolkit.org/london.pm/tt3/literal.html

A