File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1446,13 +1446,13 @@ my $captured = qx(echo $arg);
1446
1446
In Perl 6, you will probably want to run commands without using the shell:
1447
1447
1448
1448
my $arg = 'Hello';
1449
- my $captured = run('echo', $arg, :out).out.slurp-rest ;
1450
- my $captured = run(«echo "$arg"», :out).out.slurp-rest ;
1449
+ my $captured = run('echo', $arg, :out).out.slurp;
1450
+ my $captured = run(«echo "$arg"», :out).out.slurp;
1451
1451
1452
1452
You can also use the shell if you really want to:
1453
1453
1454
1454
my $arg = 'Hello';
1455
- my $captured = shell("echo $arg", :out).out.slurp-rest ;
1455
+ my $captured = shell("echo $arg", :out).out.slurp;
1456
1456
my $captured = qqx{echo $arg};
1457
1457
1458
1458
But beware that in this case there is B < no protection at all > ! C < run > does
@@ -1835,4 +1835,4 @@ live on GitHub. An online converter may become available at some point.
1835
1835
1836
1836
= end pod
1837
1837
1838
- # vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
1838
+ # vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
You can’t perform that action at this time.
0 commit comments