Perl open updating file in place