# Create a keysort function that uses two strings as keys: use Sort::Key::Maker ss_keysort => qw(string string); # And then use it. # The first argument passed is the subroutine # to extract the keys from the data: my @sorted_by_type_and_author = ss_keysort { /^name=.*? type=(.*?) author=(.*?)$/; ($1, $2) } @lines;
In reply to Re: Sorting with multiple keys
by salva
in thread Sorting with multiple keys
by Mandrake
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |