@sorted = sort { $a->[2] <=> $b->[2] } <INPUT>; chomp (@sorted); foreach (@sorted){ print; print "\n"; }
Edited: ~Mon Sep 23 15:53:50 2002 (GMT) by footpad: Replaced prose-based [ ] and < > characters with HTML entities for proper rendering.
In reply to Re: sorting and array by [2]
by kevyt
in thread sorting and array by [2]
by kevyt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |