in reply to Re^2: How to use regular expression for this?
in thread How to use regular expression for this?
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 Section
Seekers of Perl Wisdom