in reply to Re: Compare hash with arrays and print
in thread Compare hash with arrays and print
Thanks for your reply!
I am still not able to print anything to my files.
my %hash = &readFile(); my @fasta = glob('Data_Test/*.fa'); foreach my $f (@fasta){ open FILE, $f or die "Cannot open $fastaname for reading: $!\n"; local $/ = "\n>"; while (<FILE>) { s/^>//mg; my ($name) = /^(\w+)/; if($hash{$name} == 10){ select FILE1; } if($hash{$name} == 20){ select FILE2; } if($hash{$name} == 30){ select FILE3; } print ">$_"; } } close(FILE1); close(FILE2); close(FILE3);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Compare hash with arrays and print
by almut (Canon) on Jul 12, 2010 at 19:44 UTC | |
by ad23 (Acolyte) on Jul 13, 2010 at 15:06 UTC | |
by almut (Canon) on Jul 13, 2010 at 16:41 UTC | |
by ad23 (Acolyte) on Jul 13, 2010 at 17:56 UTC | |
by almut (Canon) on Jul 13, 2010 at 18:23 UTC | |
| |
|
Re^3: Compare hash with arrays and print
by Marshall (Canon) on Jul 12, 2010 at 23:19 UTC |