use File::ReadBackwards ; # Object interface $bw = File::ReadBackwards->new( '$file' ) or die "can't read '$file' $!" ; #### #!/usr/bin/env perl use strict; use warnings; use utf8; use File::ReadBackwards; my $file = 'weblog.log'; my $bw = File::ReadBackwards->new ($file) or die "can't read '$file' $!"; while (defined (my $log_line = $bw->readline)) { print $log_line; } #### $ cat weblog.log first line second line line the third $ ./rb.pl line the third second line first line $