#!/usr/bin/env perl use strict; use warnings; use Test::More; use File::Slurp; #Counter.pl open my $handle, '<', "/home/nic/Desktop/5-27-17/Genomes_used_HANT.txt"; chomp(my @HANT = <$handle>); close $handle; my @counts = (0,1,2,3,4,5,6,7,8,9,10); plan tests => scalar @hant; my $nrt2 = read_file("/home/nic/Desktop/5-27-17/NRT2.txt"); for my $hant (@HANT) { my $matches = () = my $nrt2 =~ /$hant/g; is ($matches, shift @counts, "Number of matches found for $hant"); }