in reply to Re: I get these errors when I perform the script
in thread I get these errors when I perform the script

yes, in fact in the docs for open is stated clearly:
When opening a file, it's seldom a good idea to continue if the requ +est failed, so open is frequently used with die. Even if die won't do what you want (say, in a CGI script, where you +want to format a suitable error message (but there are modules that can help with that problem)) always check the retur +n value from opening a file.

L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.