
Champion
Deleted
Feb 7, 2000, 12:49 PM
Post #1 of 6
(568 views)
|
I am having a problem sorting on the date field. Can somebody help? open(FILE, "data.dat") | | die "I can't open that because: $!\n"; while(<FILE> ) { chop; @all = split(/\n/); foreach $line (@all) { local($rnum, $teacher, $title, $date, $message) = split(/&&/, $line); if ($keyword eq "$rnum") { $match = 1; print "<li><b>$date $title</b><br>$message<p>\n"; } } } close(FILE); print "</ul></form>\n"; &html_footer; exit0; } I want my script to list all of the messages that meet the $rnum criteria. Then I want to print it in order by the $date field. Can somebody help?
|