On Thu, 2004-02-12 at 08:43, Aaron Sherman wrote: > sub sortpairs(&@) { > my $comp = shift; > my %pairs = @_; > return map {$pairs{$_}} sort {$comp->($a)} keys %pairs; > }
Doh... it's early for me. That's C<sort {$comp->()}> with no parameter. The fact that $a and $b are dynamically scoped in Perl 5 helps out here. -- Aaron Sherman <[EMAIL PROTECTED]> Senior Systems Engineer and Toolsmith "It's the sound of a satellite saying, 'get me down!'" -Shriekback
signature.asc
Description: This is a digitally signed message part