in reply to Passing Any Range of Values to a Sub
to live TMTOWTDT out, here are some other ways;
one cannot recommend the first one, but the second is a clean way:
1. a nice eval-trick, i think abigail-II used it in a sig
have a look at Language::Functional. the relevant bits are the functions foldl/foldr
HTH a bit at least :-)
one cannot recommend the first one, but the second is a clean way:
1. a nice eval-trick, i think abigail-II used it in a sig
2. something more functional?eval join ('*', @list);
have a look at Language::Functional. the relevant bits are the functions foldl/foldr
this is the POD example.$x = foldl { shift() + shift() } 0, [1..6]; # 21
HTH a bit at least :-)
In Section
Seekers of Perl Wisdom