> -----Original Message-----
> From: Mark Weisman [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 02, 2003 4:53 PM
> To: [EMAIL PROTECTED]
> Subject: Reverse Order?
> 
> 
> 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
> 


use File::ReadBackwards;

http://search.cpan.org/author/URI/File-ReadBackwards-1.00/ReadBackwards.pm


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to