Keep It Simple, Stupid | |
PerlMonks |
Re: How can I access object data in a user defined sort cmp function?by mr_mischief (Monsignor) |
on Jan 28, 2015 at 23:15 UTC ( [id://1114829]=note: print w/replies, xml ) | Need Help?? |
If sorting is something you care about within your class, then don't tell sort how to handle your object. Design a method that sorts your data within the object.
In Section
Seekers of Perl Wisdom
|
|