in reply to Array-ize a function
You find
print a(\&do_something)->(1 .. 5);
preferable to:
print map do_something( $_ ) , 1 .. 5;
? or better still
sub do_something { map{ $_ * 2 } @_ } print do_something 10; 20 print do_something 1..5; 2 4 6 8 10
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Array-ize a function
by polettix (Vicar) on Mar 18, 2005 at 15:55 UTC |