Iterate through lines in a text file

(imported topic written by sguo)

We have got a file which contains all process cpu and memory usage, now we want to use action script to process line by line to get top 5 cpu and top 5 memory… Any one has done this kind of iteration already? We are still learning action script syntax. Thanks in advance.

(imported comment written by NoahSalzman)

Can you give us a sample of what the file looks like?

(imported comment written by sguo)

For example,

col1 col2 col3

line1: 10 2 4

line2: 32 3 2

line3: 8 5 1

we want to get top 5 in the first column. It is very easy to sort them in any programming lauguage. But it seems not that straight forward in Action script.

Thank you.