On Thursday, November 14, 2002, at 09:07  AM, Michael G Schwern wrote:

Ok, here's what's gone in. It should solve both the 2>&1 problem on Win9X
and the C:\Program Files\perl\bin\perl problem, at least in find_perl().
This means MM_Win32->find_perl can go away.
[...]

@@ -1084,12 +1097,18 @@
 	    print "Checking $abs\n" if ($trace >= 2);
 	    next unless $self->maybe_command($abs);
 	    print "Executing $abs\n" if ($trace >= 2);
-	    $val = `$abs -e 'require $ver; print "VER_OK\n" ' 2>&1`;
-	    if ($val =~ /VER_OK/) {
+
+            # To avoid using the unportable 2>&1 to supress STDERR,
+            # we close it before running the command.
+            close STDERR if $stderr_duped;
+            $val = `"$abs" -e "require $ver; print qq{VER_OK\n}"`;
+            open STDERR, '>&STDERR_COPY' if $stderr_duped;

Is there no way to use the multi-arg system() to avoid these quoting issues altogether?


-Ken

Reply via email to