#!/usr/bin/perl use strict; use warnings; use diagnostics; my %count; open PROTEOME, '<', 'human_complete_proteome_without_isoforms.fasta'; while(){ next if /^>/; chomp; $count{$_}++ for split //; } print "hash has finished searching the document\n"; foreach (keys %count) { print "$_ \t occurs $count{$_} times \n"; }