in reply to How to get sort-like semantics?

The Perl Cookbook has an example of how to do this, and you can also take a look at the List::Util source, it has a reduce method as well.

I think you have to enter the local variables $a and $b into the caller's namespace.

Replies are listed 'Best First'.
Re^2: How to get sort-like semantics?
by princepawn (Parson) on Oct 25, 2007 at 15:30 UTC
    so should Language::Functional


    Carter's compass: I know I'm on the right track when by deleting something, I'm adding functionality