Sort of combining this idea with my idea, I could unroll the loop, perhaps reducing the performance penalty (or perhaps not):
my $aPush= sub { \@_ }; my $av= []; while( 9 < @_ ) { $av= $aPush->( @$av, $_[0][0], $_[1][0], $_[2][0], $_[3][0], $_[4][0], $_[5][0], $_[6][0], $_[7][0], $_[8][0], $_[9][0] + ); splice @_, 0, 10; } while( 2 < @_ ) { $av= $aPush->( @$av, $_[0][0], $_[1][0], $_[2][0] ); splice @_, 0, 3; } $av= $aPush->( @$av, $_->[0] ) for @_;
or combine more of your idea in but still not need string eval...
- tye
In reply to Re^2: Getting a list of aliases to selected items from a list of array references (unroll)
by tye
in thread Getting a list of aliases to selected items from a list of array references
by tye
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |