This XORs $pattern and $_ together, and stores it in $result.my $result = $pattern ^ $_;
This counts the number of matches, and puts that into $matches.my $matches = $result =~ tr/\0//;
-QM
--
Quantum Mechanics: The dreams stuff is made of
In reply to Re^3: How to use regular expression for this?
by QM
in thread How to use regular expression for this?
by davidz2f
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |