I'm unclear why line 9 passes a syntax check...
Unary ~ is bitwise negation. See Symbolic Unary Operators in perlop. It compiles, but is probably not logically correct. E.g.:
>perl -wMstrict -le "$_ = 'x'; print scalar(~ /x/); print scalar(~ /Y/); print 'match' if ~ /x/; print 'match' if ~ /Y/; " 4294967294 4294967295 match match
Update: Improved example code.
In reply to Re^2: regular expression.
by AnomalousMonk
in thread regular expression.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |