Permission denied

Posted by amenomade on 2017-02-18 10:19

Hello

I've installed ActivePerl 32 bits version.
perl -v
gives the right answer.

When I want to run a script, I get a "permission denied" message each time I want to open a file.

I tried the following code :

open (OUT1,">out1.txt") or die "Cannot: $!";
print OUT1 "testing\n";
close (OUT1);
exit;

and then ran it in cmd window (Administrator or not, it does not change anything) :
D:\username\Documents>perl test.pl
Cannot: Permission denied at test.pl line 1.

The "Documents" folder is the windows document folder where my username has normally all rights.

What is wrong?
Regards
amenomade