good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: How can I access object data in a user defined sort cmp function?by geistberg (Novice) |
on Jan 29, 2015 at 19:18 UTC ( [id://1114962]=note: print w/replies, xml ) | Need Help?? |
The <=> can dig into objects and hashes, so you can use something like $a->key->{'other'} <=> $b->key->{'other'}.
Proof of concept:
I hope that is helpful :)
In Section
Seekers of Perl Wisdom
|
|