in reply to sorting and array by [2]

Thanks Kabel, I tried this but it doesnt sort. I need a split somewhere but I am not sure where to place it. The data is read in by a function that places one line into [0] and the next line is in [1]. I placed <INPUT> where the function is for simplicity for the posting.
@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.