in reply to Re: reading file from the end till some value is found
in thread reading file from the end till some value is found

Hi. Sorry, there was no try on my part, it was just begginers question if there is a command telling perl to start reading from the end of the file (and to my surprise googling didnt help). The answers below are appreciated (unfortunately i dont have mac). I found yet another package File::ReadBackwards and whe trying I bumped into a surprising problem: when I read xml file it is broken into individual letters instead of lines. And when I tried standard procedure
open(DATAFILE, $file); while (defined ($line = <DATAFILE>)) { chomp $line; print $line } close(DATAFILE);
and got the same letter soup. What is wrong? I tried to redefine end of line by setting local $/ as "something at the beggining of the file" and something not in the file but it doesnt helped (and did similar in File::ReadBackwards->new( $filename_in,"something as above" ))). Please help.