I am expecting each row in the array to contain
"$status\t$reference\t$project\t$created\n"
The array has 96 rows so far and each row has four elements tab separated.
Here I am slurping the entire file into an array.
open (LINKS, "$linksQuery") || die ("Can't open $linksQuery: $!");
my @links = <LINKS>;
close (LINKS);
I take it one step further by separating this one array into two arrays based off of $status.
for (@links) {
chomp($_);
my ($status, $reference, $project, $created) = split(/\t/, $_);
if ($status eq "Completed") {
push(@complete, $_);
} else {
push(@progress, $_);
}
}
After I have these two arrays I want to sort each in most recent to latest order. I used the other response to my post, which did sort both arrays but "12/13/02 09:42:51 CST" happens to appear before 12/05/02 13:19:50 CST when it should be the other way around.
I hope that I made things sound a little more clearier with this explanation.
Thanks for you help again,
Bionicle32 |