#!/usr/bin/perl -w use strict; my @database = <DATA>; sub g($) {(split/\|/,shift)[$#_]} my @sorted = sort {g$a<=>g$b} @database; print @sorted; __DATA__ a|b|c|10 d|e|f|g|h|9 i|100 j|k|2 l|m|n|o|11
"Argument is futile - you will be ignorralated!"
In reply to Re: Sorting issues
by larryk
in thread Sorting issues
by Stamp_Guy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |