in reply to Capture OLE Execption

The exception-handling mechanism in Perl is eval{}.   Also consider Try::Tiny.