I want to create a file on my webserver and set the chmod to 666. However, I seem to have to create the file manually. I know how to rmdir to remove directories and such but how do I make actual *.txt files from Perl code and set the permissions?
$file = "file.txt";
open(F, ">$file" or die "Can't open $file: $!\n";
print F "hello world\n";
close(F);
chmod 0666, $file;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.