That works just fine. Makes it a closure. 'tag00' can be a literal or a calculation.my $coderef = do { my $op = 'tag00'; sub { dofunc($op) } };
-- Randal L. Schwartz, Perl hacker
In reply to Re: eval with sub
by merlyn
in thread eval with sub
by strredwolf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |