Read the documentation for open. You're currently trying to open for reading instead of writing.
Also, give yourself all the debugging information possible in your die statements. It would've told you what was wrong.
my $file = "C:\\TEMP\\cfg"; open CFG, '>', $file or die "failed to open $file: $!";
In reply to Re: Failed to create a file
by wind
in thread Failed to create a file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |