in reply to Picking out specific lengths from a set of hashes.
In doing @seqarray = ($id."\n",$seq{$id}); you are resetting seqarray to a single member no matter what is in there already. I suspect you want to push something onto seqarray. I would push $id, then later use that to get at the contents of $seq{$id} as well.
foreach $id (keys %seq){ if ((length ($seq{$id}) <= $maxlength) || (length($seq{$id}) >= $m +inlength)){ push @seqarray,$id; } } for my $id (@seqarray){ print $id."\n".$seq{$id}."\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Picking out specific lengths from a set of hashes.
by Peter Keystrokes (Beadle) on May 11, 2017 at 18:43 UTC | |
by huck (Prior) on May 11, 2017 at 18:56 UTC | |
by Peter Keystrokes (Beadle) on May 11, 2017 at 21:49 UTC | |
by shmem (Chancellor) on May 12, 2017 at 17:57 UTC | |
|
Re^2: Picking out specific lengths from a set of hashes.
by Marshall (Canon) on May 13, 2017 at 06:11 UTC |