in reply to Opening pipe : no such file or directory

This is weird. Are you certain that $SourceRoot is valid? The following works for me:

perl -wle "open($hProcess, 'dir Q:\\ 2>&1 |'); print for <$hProcess>"

Maybe $SourceRoot contains whitespace but is not quoted properly for the shell?</c>

Replies are listed 'Best First'.
Re^2: Opening pipe : no such file or directory
by Anonymous Monk on Sep 08, 2015 at 08:11 UTC

    :) It is possible to have a dir.exe which could confuse things :) as sometimes you're calling cmd.exe and sometimes you're not :)