tie *BW, File::ReadBackwards, 'file' or die "can't read file $!"; while( ) { # do your stuff here ; }