I concur. Even sucking the whole file in with
@lines = <$INFILE>;
and just printing the results in reverse order makes more sense than physically writing to the file in such an unnatural order. Of course, that presumes the file is not of a monstrous size, etc etc.