use warnings;
use strict;
####
12 my $seq =();
####
23 $o{$header} = "$seq";
27 print "$line";
28 $header = "$line";
33 $seq .= "$line";
####
35 #Q: How many times is the $search found inside all the hash values??
37 while (my ($key,$value) = each(%o)) {
38 $hits++ while $value =~ /$search/gi;
39 }
40
41 #Q: How many hash values contain at least one <93>$search<94> inside of them?
42 ####################
43 #FOREACH LOOP START#
44 ####################
45 foreach my $key (keys %o) {
46 $searchline = $o{$key};
47 if ($searchline =~ /$search/gi) {
48 $contains ++;
49 }
50 }
51 ###################
52 # FOREACH LOOP END#
53 ###################
####
my $hits;
$hits += () = /$search/gi for values %o;
my $contains = $hits;
####
68 if ($count) {
69 my $ofound = ($hits)/($count);
70 } elsif ($count ==0) {
71 }
####
my $ofound;
if ($count) {
$ofound = ($hits)/($count);
} elsif ($count ==0) {
}
####
if ($count) {
return $hits / $count;
} elsif ($count ==0) {
}