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");
In reply to Re: how to count matches
by j1n3l0
in thread how to count matches
by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |