On Dec 8, 1:57 am, [email protected] (C.DeRykus) wrote:
> On Dec 8, 12:08 am, [email protected] (Anders Hartman) wrote:
>
>> ...
> ...
> Also, in this case, I'd write the eval for compile-time and check
> for errors:
>
> eval { asub() };
> die $@ if $@;
>
No, sorry, that's a "useless use of eval" since you could just call
the sub directly. Since, the intent was to define and call the sub
dynamically though, checking for eval errors is still a good idea.
--
Charles DeRykus
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/