On Mon, 06 Apr 2015 07:22:19 -0700, masak wrote:
> $ perl6 -v
> This is perl6 version 2015.03-170-g143f621 built on MoarVM version
> 2015.03-49-gce786a1
>
> $ perl6 -e '$_ = "5 breads and 2 fish"; s[(\d)] = "{$0 * 10}"; .say'
> 50 breads and 2 fish
>
> $ cat input
> 5 breads and 2 fish
> $ perl6 -pe 's[(\d)] = "{$0 * 10}"' < input
> use of uninitialized value of type Nil in numeric context in block
> <unit> at -e:1
>
> 0 breads and 2 fish
>
> Expectation: that `s[(\d)] = "{$0 * 10}"` statement shouldn't give a
> warning about $0 being Nil, just because I'm in -p
$ echo 5 breads and 2 fish | perl6 -pe 's[(\d)] = "{$0 * 10}"'
50 breads and 2 fish
Seems to have been resolved at some point.
Tests added to S19-command-line-options/03-dash-p.t
Marking ticket resolved.