- or download this
open (FILE, ">>$db") or print STDERR "[$0] Could not open file! $!";
- or download this
open (FILE, ">>$db") or die "[$0] Could not open file! $!";
- or download this
if( open (FILE, ">>$db")) {
print (FILE "Name:$name,Surname:$sname\n");
...
print STDERR "[$0] Could not open file '$db': $!";
print "<b>Sorry, an error happened: $!";
};