I would count all characters, and at the end only display the characters you are interested in.perl -0777E '$s{$_}++ for split//,<>; say "$_ ", $s{$_}||0 for "a".."z +", "A".."Z"' your-data-file
In reply to Re: Hash to count characters
by JavaFan
in thread Hash to count characters
by amittleider
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |