# Either this: use Win32API::File; my $uOldMode = Win32API::File::SetErrorMode( $uNewMode ); # or this: use Win32API::File qw( SetErrorMode ); my $uOldMode = SetErrorMode( $uNewMode );