in reply to Prototype like sort()?
Thanks for all the answers, and sorry for not explaining myself more clearly. Basically I want to provide a sort-like function that users can use like sort(). The actual code I'm talking about is List::Rank.
sort SUBNAME LIST sort BLOCK LIST sort LIST
If users don't specify BLOCK or SUBNAME then sorting will be done the default way (lexically). If BLOCK or SUBNAME is specified, then sorting will be done using that custom sorter.
Seeing that this is not possible, I settled with separate subroutines.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Prototype like sort()?
by LanX (Saint) on Feb 01, 2018 at 17:23 UTC | |
by perlancar (Hermit) on Feb 05, 2018 at 05:14 UTC | |
by LanX (Saint) on Feb 05, 2018 at 08:40 UTC | |
by perlancar (Hermit) on Feb 05, 2018 at 10:15 UTC | |
by LanX (Saint) on Feb 05, 2018 at 10:18 UTC | |
Re^2: Prototype like sort()?
by haukex (Archbishop) on Feb 01, 2018 at 14:38 UTC | |
by LanX (Saint) on Feb 01, 2018 at 19:13 UTC | |
by LanX (Saint) on Feb 01, 2018 at 17:13 UTC | |
by perlancar (Hermit) on Feb 05, 2018 at 05:11 UTC |
In Section
Seekers of Perl Wisdom