RosettaCodeData/Task/Execute-a-system-command/Perl-6/execute-a-system-command.pl6
2019-09-12 10:33:56 -07:00

6 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