I have a Perl script that fetches images from online sites. It's run in terminal.
Just today I upgraded from El Capitan to High Sierra.
Trying out the script, I get this error:
Line 22 is in the following sub-routine
It's the line:
"open(my $LOG, ">>", $file) || die "Could not create log file.\n" . $!;"
I assume there's a permission issue that changed between El Capitan and High Sierra that's caused the problem, but I don't know what yet....ANYone have some ideas?
Just today I upgraded from El Capitan to High Sierra.
Trying out the script, I get this error:
Could not create log file.
Operation not permitted at scav2_dl_daz.pl line 22.
Line 22 is in the following sub-routine
Code:
sub Logger {
my $file = shift;
my $msg = shift;
my $stop = shift || 0;
open(my $LOG, ">>", $file) || die "Could not create log file.\n" . $!;
#print $LOG sprintf("%s: %s\n", strftime("%H-%M-%S", localtime), $msg); -Time Stamp in log files
print $LOG sprintf("%s\n", $msg);
close($LOG);
# Exit with error
unless ($stop == 0) { exit 1; }
}
It's the line:
"open(my $LOG, ">>", $file) || die "Could not create log file.\n" . $!;"
I assume there's a permission issue that changed between El Capitan and High Sierra that's caused the problem, but I don't know what yet....ANYone have some ideas?