Perl Monk, Perl Meditation | |
PerlMonks |
Re^3: Sort mechanics problems with objects and potentially contradicting comparisons (would cause infinite loop)by ikegami (Patriarch) |
on Jun 01, 2016 at 16:52 UTC ( [id://1164703]=note: print w/replies, xml ) | Need Help?? |
That makes things far more complicated. Because _compare is likely to be in a package other than the sort, _compare would have to use ${ caller.'::a' } and ${ caller.'::b' } instead of $_[0] and $_[1]. Best to pass $a and $b are arguments.
In Section
Seekers of Perl Wisdom
|
|