Open file in perl with sudo
I'd like to write data to a file, but the file handle should be opened
with sudo or else I get permission denied error. But looks like something
like following is not possible in perl?
sudo open (FH, "> $filename") or die "$@\n";
No comments:
Post a Comment