my %hash = (); my $line = ""; #### sub readfasta { my $ifn = shift; my $IFH; open($IFH, "<$ifn") or die "cannot open file $ifn\n"; my $line; my %ret; my $tot = 0; while($line = <$IFH> ){ chomp $line; if(not($line eq "")) { ##### why does $line equal "" ? my @tmp = split(//,$line); if($tmp[0] eq ">") { my $nm = substr($line,1); $nm = $nm . $tot; $tot++; $line = <$IFH>; chomp $line; $ret{$nm} = $line; } } } close($IFH); return(\%ret); }