in reply to Re: Calling a function from within a HERE doc?
in thread Calling a function from within a HERE doc?
While it presents a much steeper learning curve, Template-Toolkit is extremely clever and robust.
use strict; use warnings; use Template; use POSIX; my $tt = Template->new; $tt->process(\*DATA, { var_day => strftime("%D %r",localtime)} ) or die $tt->error; __DATA__ [% USE day = date(format => '%D %r') -%] >>[% var_day %]<< >>[% day.format(time) %]<<
Update: fixed funny tyepo -- s/learning curse/learning curve/
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|