RosettaCodeData/Task/Execute-a-system-command/Raku/execute-a-system-command.raku

7 lines
150 B
Raku

run "ls" orelse .die; # output to stdout
my @ls = qx/ls/; # output to variable
my $cmd = 'ls';
@ls = qqx/$cmd/; # same thing with interpolation