in reply to incrementing the file
What have you tried? You do know about Perl's file test operators such as -f (see perldoc -f -X) don't you?