Hi!
I just found a strange behaviour in the current Perl6:
print "Yes r\n" if "0" =~ /0/;
print "Yes s\n" if "0" =~ "0";
prints:
Yes s
It appears that the RE match returns a false value. If I match:
print "Yes r\n" if "1" =~ /1/;
it does print "Yes r". I also tried:
$r= "0"=~/0/;
$s= "0"=~"0";
print '|',$r,"|\n";
print '|',$s,"|\n";
(the variable assignment is to (try to) avoid list context)
and it prints:
||
|1|
At first I thought that the match returned the matched string or
something, but this seems to contradict...
What's going on?
--
Dakkar - <Mobilis in mobile>
GPG public key fingerprint = A071 E618 DD2C 5901 9574
6FE2 40EA 9883 7519 3F88
key id = 0x75193F88
Second Law of Business Meetings:
If there are two possible ways to spell a person's name, you
will pick the wrong one.
Corollary:
If there is only one way to spell a name,
you will spell it wrong, anyway.