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);
In reply to Re^2: Compare hash with arrays and print
by ad23
in thread Compare hash with arrays and print
by ad23
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |