As the error message says, perhaps you forgot to load IO::Handle. Trust the (first) error message.
In reply to Re: Perl module problem by chromatic in thread Perl module problem by stew