in reply to performance - loops, sub refs, symbol tables, and if/elses
Then I'd use the statement-modifier form of "for", which avoids setting up a lexical block:if ( $type eq 'apple' ) { *func = sub { &apple_wash; &apple_core; &apple_pulp; }; }
(Pass the item in $_ instead of in an explicit variable.)&func for @items;
jdporter
...porque es dificil estar guapo y blanco.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: performance - loops, sub refs, symbol tables, and if/elses
by djantzen (Priest) on Dec 17, 2002 at 16:57 UTC |