The variable $! contains the operation system error message, in case something went wrong ;-)open FILE, "+>", "/var/named/$domain.db" or die "Could not open file $domain.db: $!\n";
Secondly, maybe you should check if the variable $domain is defined and has content?
to ask a question is a moment of shame
to remain ignorant is a lifelong shame
In reply to Re: Can't create file
by insaniac
in thread Can't create file
by sluttysysadmin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |