Rob talked about

foreach $value(sort {$a <=> $b} (values(%hash)) {
    print $value;
}

vs.

foreach $value(sort byNum (values(%hash)) {
    print $value;
}

sub byNum {
    $a <=> $b;
}


Am I correct in thinking that the anonymous subroutine is vaguely more
efficient?

-- 
iain.                                          <http://eh.org/~koschei/>

Reply via email to