Dating after failed engagement perl open updating file in place