I read a text file into HTML for viewing through a webpage, fairly
straight forward.

Open (INFILE, "<filename.txt") || die "Error opening
filename.txt.$!,stopped";
@array = <INFILE>;
Close(INFILE);
Foreach my $rec (@array) {
        chomp($rec);
        ($a,$b) = split(/\|/,$rec);
        print "<i>$a - $b</i><br>\n";
};

This code simply reads the text file, and populates it to the screen in
the line order from the text file. I need to reverse the order from the
text file to the screen. So that the last entry in the text file appears
at the top of the HTML page? Can anyone help me out? I'm hoping that I
can just do this in the display code, and that I don't have to rewrite
the file writing sequence.

Sincerely in Christ,
Mark

Reply via email to