I have recently started with perl (this week). A client will ask the server for a file, the server has to create the file with the data requested.
So i've been trying to create a file but it is denying permission.
For now: This is the portion of code. I took it from the internet.
$filename = 'report.txt';
open($fh, '>', $filename) or $message="Could not open file '$filename' $!";
print $fh "My first report generated by perl\n";
close $fh;
I will continue with the data i have to write, after i can make this work.
I am using lighttpd with "www-data" user. I've been several hours trying to solve it... Moreover, i am using $message because i don't know how to use "die". When i used "die" it would show "500 - Internal Server Error" and nothing else.
I am working in Ubuntu 14.04