in reply to Re^5: Counting matches
in thread Counting matches
Ok, I tried this script and got the following error. "You said to perform 0 tests at Counter.pl line 13". What should I change? Sorry like I said I am new at writing perl scripts. My script might not make sense.lol#!/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"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Counting matches
by shmem (Chancellor) on May 29, 2017 at 17:19 UTC | |
by Nicpetbio23! (Acolyte) on May 29, 2017 at 17:45 UTC | |
by shmem (Chancellor) on May 29, 2017 at 20:37 UTC |