|Perl: the Markov chain saw|
Check even numbers?by Anonymous Monk
|on Aug 06, 2006 at 22:07 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
Hello there monks!
I have a counter inside a Perl script, which counts the number of occurences of a certain pattern in a file.
The lines in the file are something like:
So, if, in each sequence, the program finds, for instance, the letter 'A', it adds 1 to the counter. What I want to print out is those proteins and their sequences, that have even number of occurences of the letter 'A' (2,4,6,8 etc).
Is there a function or something that checks if a number is odd or even?