in reply to RE: scalarmap - some new perl syntax
in thread scalarmap - some new perl syntax
Reduce is a much better name. It calls your sub with $a and $b set to the first two elements of the array which is neater in some ways, but would make it harder to write the factorial example above.
Here is a related question - I tried to write the subroutine above with the paramters ($&@) but I couldn't then call the subroutine - looks like a bug... (I posted an example of this a bit further up the thread)
BTW it is List::Util
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: RE: scalarmap - some new perl syntax
by btrott (Parson) on Sep 01, 2000 at 11:49 UTC | |
by ncw (Friar) on Sep 01, 2000 at 12:01 UTC |