my @words = qw ($chromosomefilename); my $count = grep /$recognitionsequence/, @words;
So you're counting if $recognitionsequence matches the string $chromosomefilename (the literal string, not the contents of that variable). Is that what you want? If not, take it as a clue as to where start searching for errors.
In reply to Re: Count the occurance of a words in a string
by moritz
in thread Count the occurance of a words in a string
by Pratyusha Reddy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |