why doesn't this work ? I want the number of A's in the line to be stored in Acount. Thanks for your help, basm100while(<MYFILE>) { $line=<MYFILE> $Acount =($line=~tr/A//); #to count no. of A's in a line #if I then print $Acount it says 0 even if there are A's in the line ! }
In reply to Counting using transliteration by basm100
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |