http://www.perlmonks.org?node_id=1008799


in reply to Re: opened file being overwritten
in thread opened file being overwritten

The warnings tell you not everything is fine :)

If you run the code through B::Deparse or even perlcritic and you'll see some more problems with the code

The most obvious that many have mentioned is using the "||" operator ( C-style logical or ) instead of the "or" operator ( Logical or )

See perltrap/Common Perl Pitfalls

Hi