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
In reply to Re^2: opened file being overwritten
by Anonymous Monk
in thread opened file being overwritten
by perishowl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |