in reply to how to count matches
This way you can choose which letter's count you wish to view ;)#!/usr/bin/perl -w use strict; my $string = q<ABCDABDIDAOFOOFAA>; my %count; for (split(//, $string)){$count{$_}++;} print(q<Matches >, $count{A}, "\n");
|
|---|