if ( $last_payment == 1 ) { print "last record\n"; print FH "\n"; }