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


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

Either use the fully-qualified name of the function, or import it in the use statement.
# Either this: use Win32API::File; my $uOldMode = Win32API::File::SetErrorMode( $uNewMode ); # or this: use Win32API::File qw( SetErrorMode ); my $uOldMode = SetErrorMode( $uNewMode );