Does anybody know? This is definitely not the behaviour I expect. I could accept a syntax error, but this is just bizzre;
!~~seems equivalent to
~~... and there's more...
use 5.10.0; use strict; use warnings (FATAL => 'all'); my $a = "hello"; my $b = "hello"; print "a matches b\n" if($a ~~ $b); print "a not matches b\n" if($a !~~ $b); print "a matches not b\n" if($a ~~! $b); print "a matches and a half b\n" if($a ~~~ $b); print "a not matches and a half b\n" if($a !~~~ $b); print "a double matches b\n" if($a ~~~~ $b); print "a not double matches b\n" if($a !~~~~ $b);
This yields;
a matches b a not matches b a double matches b a not double matches b
Does anybody know why?
In reply to Why is to match, not to match? by CRAKRJACK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |