in reply to Re^2: print a file from Bottom to Top (reverse order)
in thread print a file from Bottom to Top (reverse order)

Changing just a couple of small things to haukex's solution above should give you what you need:
use warnings; use strict; use File::ReadBackwards; my $bw = File::ReadBackwards->new('/var/log/maillog') or die $!; while (defined( my $line = $bw->readline )) { print $line if $line =~ /Passed CLEAN/; } $bw->close;

Replies are listed 'Best First'.
Re^4: print a file from Bottom to Top (reverse order)
by theravadamonk (Scribe) on Jun 22, 2018 at 15:45 UTC

    Thanks a lot for your kind reply. I get what I expect from your INPUT. I thank all who participated in this mail tread.