use Win32API::File qw< SetErrorMode SEM_FAILCRITICALERRORS >; SetErrorMode( SEM_FAILCRITICALERRORS() | SetErrorMode(0) );