http://www.perlmonks.org?node_id=938703


in reply to Re^2: -e on windows giving error
in thread -e on windows giving error

I presumed you neither imported SetErrorMode nor used its full name?

use Win32API::File qw( SetErrorMode SEM_NOOPENFILEERRORBOX ); SetErrorMode( SetErrorMode(0) | SEM_NOOPENFILEERRORBOX );