How do I sort the contents of a flat file based on the second field?
What I have now sorts by the first field - 0
[CODE=perl]
open (BASE, $dbk) || do {&no_open;};
@sorted = sort(<BASE>);
foreach $pair (@sorted) {
@show = split(/,/, $pair);
close(BASE);
[/CODE]
My fields are:
[0,1,2,3,4,5,6,7 ,8,9,10,11]
many thanks
Paul
What I have now sorts by the first field - 0
[CODE=perl]
open (BASE, $dbk) || do {&no_open;};
@sorted = sort(<BASE>);
foreach $pair (@sorted) {
@show = split(/,/, $pair);
close(BASE);
[/CODE]
My fields are:
[0,1,2,3,4,5,6,7 ,8,9,10,11]
many thanks
Paul
Comment