This is another case where it makes a difference whether the command comes on a 
single line or on two separate lines:

$ perl6-m -e 'say "a".subst(/(.)/,{$0~$0}); say "%20" ~~ /:i 
\%(<[0..9A..F]>**2)/; say "a".subst(/(.)/,{$0~$0});'
aa
「%20」
 0 => 「20」
aa

But with a newline in the echo command:

$ echo 'say "a".subst(/(.)/,{$0~$0}); say "%20" ~~ /:i \%(<[0..9A..F]>**2)/;
say "a".subst(/(.)/,{$0~$0});' | perl6-m
aa
「%20」
 0 => 「20」
2020

The behaviour differs with rakudo.parrot and rakudo.jvm:

$ echo 'say "a".subst(/(.)/,{$0~$0}); say "%20" ~~ /:i \%(<[0..9A..F]>**2)/;
say "a".subst(/(.)/,{$0~$0});' | perl6-p
> say "a".subst(/(.)/,{$0~$0}); say "%20" ~~ /:i \%(<[0..9A..F]>**2)/;
aa
「%20」
 0 => 「20」
> say "a".subst(/(.)/,{$0~$0});
aa
>

$ echo 'say "a".subst(/(.)/,{$0~$0}); say "%20" ~~ /:i \%(<[0..9A..F]>**2)/;
say "a".subst(/(.)/,{$0~$0});' | perl6-j
> say "a".subst(/(.)/,{$0~$0}); say "%20" ~~ /:i \%(<[0..9A..F]>**2)/;
aa
「%20」
 0 => 「20」
True
> say "a".subst(/(.)/,{$0~$0});
a
True
> 

Reply via email to