open(my $filehandle, '<', $filename) or die "error opening $filename: $!"; my @pairs = sort { $$a[0] <=> $$b[1] } map { chomp; [ split /\s*,\s*/ ] } grep { /\S/ } # skip empty lines <$filehandle>;
In reply to Re: beginner - ordering tuples
by Anonymous Monk
in thread beginner - ordering tuples
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |