[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] counting in REs



> (1) !(tr/a/a/ % 2)
> (2) tr/b/b/ % 2
> (3) (tr/b/b/ % 2) & !(tr/a/a/ % 2)

In all truth, I think tr/// and y/// aren't seen as regexes, since they're
merely character class substitutions.  However, those are much more
efficient than the regexes we're making.  You also don't need to include
the letter on the RHS.

tr/a// works just fine.

-- 
jeff pinyan    japhy@pobox.com
perl stuff     japhy+perl@pobox.com
CPAN ID: PINYAN            http://www.perl.com/CPAN/authors/id/P/PI/PINYAN


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe