I can use system
in Perl 5 to run external programs. I like to think of system
like a miniature "Linux command line" inside Perl. However, I cannot find documentation for system
in Perl 6. What is the equivalent?
In addition to using shell
or run
, which replace system
from Perl 5, you can also use NativeCall
to invoke the libc system
function.
On my Windows box, it looks like this:
use NativeCall;
sub system(Str --> int32) is native("msvcr110.dll") { * };
system("echo 42");
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments