Slightly off topic, but related to coding style of sorts.
open(CFG, "C:\\TEMP\\cfg") || die "Failed to create cfg";You have included the parens in your call to open, which allows the ... || die ... to work as expected. If you leave off the parens - open CFG, "C:\\TEMP\\cfg" || die "Failed to create cfg";, this will give you the wrong results. Having stubbed my toe on this many times, I have made it my habit to use action or die instead of action || die.
--MidLifeXis
In reply to Re: Failed to create a file
by MidLifeXis
in thread Failed to create a file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |