Hello all
I have this little for each loop that sorts data field $rec->[3] numerically first then alphabetically. The $rec->[3] data fields only contain the numbers (1,2,3,4).
I would like all the sorted data where
$rec->[3] data fields contain the number (1) to be put into a seperate array.
all the sorted data where $rec->[3] data fields contain the number (2) to be put into a seperate array.
all the sorted data where $rec->[3] data fields contain the number (3) to be put into a seperate array.
all the sorted data where $rec->[3] data fields contain the number (4) to be put into a seperate array.
Thanks for any help
Tim
In the begining
Let us first assume that there was nothing to begin with.
I have this little for each loop that sorts data field $rec->[3] numerically first then alphabetically. The $rec->[3] data fields only contain the numbers (1,2,3,4).
I would like all the sorted data where
$rec->[3] data fields contain the number (1) to be put into a seperate array.
all the sorted data where $rec->[3] data fields contain the number (2) to be put into a seperate array.
all the sorted data where $rec->[3] data fields contain the number (3) to be put into a seperate array.
all the sorted data where $rec->[3] data fields contain the number (4) to be put into a seperate array.
Thanks for any help
Tim
Code:
foreach my $rec (
sort{
$a->[3] <=> $b->[3]||$a->[2] cmp $b->[2]}@records
)
{
$rowstr .= $rec->[1] .'. '. $rec->[2].'.'.$rec->[3].'.'.$rec->[4].'<BR>'}
print "$rowstr\n";
}
In the begining
Let us first assume that there was nothing to begin with.