in reply to term in last line of flatfile

How can i skip the last line in a flatfile
You could use eof() like this:
while(<PAST>) { last if eof(PAST); ... }

-Blake