in reply to Sorting issue
Clearly what you need is a "custom sort" criteria block. So instead of just sort keys %tag as your code above has it, you can do something like this:
foreach my $tags ( sort { (split /,/,$a)[1] <=> (split /,/,$b)[1] } keys %tag ) {
Of course, this could be optimized, and that might be important if your input file is huge.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sorting issue
by bluray (Sexton) on Nov 05, 2011 at 01:35 UTC | |
by aaron_baugher (Curate) on Nov 05, 2011 at 01:44 UTC | |
by bluray (Sexton) on Nov 05, 2011 at 01:47 UTC |