catfish1116 has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to open a file and print to it. I put a die command if the file couldn't be appended. Below is my code and the error that I received.
select BEDROCK if (! open BEDROCK, ">>/home/barney/.error_log") { die "Cant open file: $!"; } print "I hope MR. Slate doesnt find out about this \n"; print "Wilma! \n"; syntax error at ./Page_100 line 10, near ") {" Execution of ./Page_100 aborted due to compilation errors.
Thanks in advance Catfish
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Open Error
by LanX (Saint) on Nov 26, 2018 at 16:26 UTC | |
|
Re: Open Error
by Eily (Monsignor) on Nov 26, 2018 at 16:58 UTC |