in reply to Open statement

When faced with a problem like this, a good start would be to read the documentation for open. That says this about the return value from open:

Open returns nonzero upon success, the undefined value otherwise

So your code is called open, checking the return value and taking appropriate action if it fails.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg