RosettaCodeData/Task/Execute-a-system-command/Perl-6/execute-a-system-command.pl6

7 lines
148 B
Raku

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