use English qw/-no_match_vars/; ... our $filespec; if ($OSNAME =~ /win/i) { $filespec = qr{ (\A(?:[[:alpha:]]:)?[ \\ \. \- [:space:] [:word:] ]+)\z }msx; } else { $filespec = qr{ (\A[- + @ [:word:] . / ]+)\z }msx; } ... our $perl = untaint_path( $EXECUTABLE_NAME, '$perl' ); ... sub untaint_path { my ( $path, $description ) = @_; if ( !( $path =~ $filespec ) ) { die "$description is tainted.\n"; } return $1; } #### t\01-load.................1/1 # Testing Module::Starter::Plugin::CGIApp 0.07, Perl 5.010000, C:\STRAWB~1\perl\bin\perl.exe t\01-load.................ok t\extutils-makemaker......$perl is tainted. Compilation failed in require at t\extutils-makemaker.t line 12. BEGIN failed--compilation aborted at t\extutils-makemaker.t line 12. t\extutils-makemaker...... Dubious, test returned 2 (wstat 512, 0x200) No subtests run