in reply to Permission denied writing to Windows 10
I just did a test on one of my win2k8r2 boxes, and I can reproduce the permission denied error by setting the Read Only flag on the hello.txt file before running the open on it. Could this possibly be your case?
# after setting the RO bit c:\>perl -E "open FILE, '> hello.txt' or die $!" Permission denied at -e line 1.
Note that you should be using 3-arg open, and lexical, not bareword file handles:
open my $fh, '>', 'hello.txt' or die $!;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Permission denied writing to Windows 10
by Anonymous Monk on Sep 14, 2016 at 18:50 UTC |