I tried the following code:
print "Yes\n" if "0" =~ /0/; print ("0" =~ /0/); print "\n";
In Perl5 it prints:
Yes 1
as I expected. In Perl6 it prints:
Yes, just an empty line.
If I change all the 0s to 1s, it prints:
Yes
What is the match returning?
In reply to Perl6 pattern match return value by dakkar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |