Hi All,

The Perl 5 guys have it pounded into my head that I
always had to check my substitutions to see if they
worked if not working would crash the program.

So in Perl 6 I have:

$ p6 'my $x="abc"; if s/b/z/ {say "sub worked"}else{say "sub failed"}; say "$x";'

Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
  in block <unit> at -e line 1
sub failed
abc


What am I doing wrong?

Many thanks,
-T

Reply via email to