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

7 lines
150 B
Raku
Raw Permalink Normal View History

2019-09-12 10:33:56 -07:00
run "ls" orelse .die; # output to stdout
2013-04-10 22:43:41 -07:00
my @ls = qx/ls/; # output to variable
my $cmd = 'ls';
2015-11-18 06:14:39 +00:00
@ls = qqx/$cmd/; # same thing with interpolation