http://www.perlmonks.org?node_id=1027159


in reply to Re^2: removing lines that are in the end of a file
in thread removing lines that are in the end of a file

No, it would truncate after the first line that ends in SIL that is followed by a line ending in SIL; that much I did test. It works as it should for the data the OP posted, but your read-backwards solution is better because it doesn't make the assumption that SIL lines are only repeated in succession at the end of the file in the real data-set. Had I seen yours before posting I wouldn't have bothered since it's a more reliable variation on the tell and truncate theme. ;)


Dave