#!/usr/bin/perl use strict; use warnings; use diagnostics; open PROTEOME,'human_complete_proteome_without_isoforms.fasta'; my @proteome=; chomp @proteome; my @aminoacid; my @hold; my $peptide; foreach my $j (@proteome) { if($j!=/^>/) { push @hold,$j; } } print "The proteome is loaded\n"; $peptide= join ('', @hold); undef @hold; @aminoacid=split(//,$peptide); my %count; foreach (@aminoacid) { if(exists $count{$_}) { $count{$_}++; } else { $count{$_}=1; } } print "hash has finished searching the document\n"; foreach (keys %count) { print "$_ \t occurs $count{$_} times \n"; }