Documentation for routine run

Documentation for routine run, assembled from the following types:

role IO

From IO

(IO) sub run

sub run(*@args ($*@) --> Proc)

Runs an external command without involving a shell and returns a Proc object.

run 'touch''>foo.txt';
 
run Q:w{rm >foo.txt}# Another way to use run, using word quoting for the 
                      # arguments 

To capture output or error you can use the :out or :err arguments respectively:

my $proc = run 'echo''Perl 6 is Great!':out:err;
with $proc.out { say .get.close } # OUTPUT: «Perl 6 is Great!␤» 
with $proc.err { say .get.close } # OUTPUT: «Nil␤» 

See Proc and Proc::Async for more details.

class Thread

From Thread

(Thread) method run

method run(Thread:D:)

Runs the thread, and returns the invocant. It is an error to run a thread that has already been started.