[Templates] Capturing the output of blocks in hash elements
Randal L. Schwartz
merlyn@stonehenge.com
22 Nov 2006 07:55:33 -0800
>>>>> "Clinton" == Clinton Gormley <clint@traveljury.com> writes:
Clinton> Hiya
Clinton> This works:
Clinton> output = PROCESS my_block;
Clinton> This doesn't:
Clinton> data = {
Clinton> output => PROCESS my_block,
Clinton> other => PROCESS my_other_block
Clinton> };
Clinton> but instead dies with the error : unexpected token PROCESS
Clinton> Is there any syntax that will allow this, or do I just have to do:
Clinton> output = PROCESS my_block;
Clinton> data = {
Clinton> output => output,
Clinton> };
Haven't tested, but I bet this works:
data = {};
data.output = PROCESS my_block;
data.other = PROCESS my_other_block;
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!