Using Perl 6 on Windows I want to programatically call a .bat
file. Both the path to the .bat
file and one of its arguments have a space in it. I can not call the .bat
file directly for reasons given at the end of the question. The call I want to make is:
"C:\data\p6 repos\rakudo\perl6-m.bat" --target=mbc "--output=C:/data/p6 repos/rakudo/lib/.precomp/EA6F1A9F9A17B17B899C4C7C4A775A883DAF537E/33/33A52796DB3EBB40BEF94B7696A1B0AB7A29B5C5.bc" "C:/data/p6 repos/rakudo/lib/CompUnit/Repository/Staging.pm6"
I need to capture its STDIN
and STDOUT
and retrieve the exit code.
How do I do this?