It would be helpful to handle these rogue entries.Well, then, to modify tommyw's code:
use strict; my (%hash, @G1_out, @G2_out); my @rogues; $hash{$_}=\@G1_out for qw(H0 H1); # etc $hash{$_}=\@G2_out for qw(PX P2); while (<>) { chomp; push @{$hash{substr($_, 0, 2)} || \@rogues}, $_; }
In reply to Re: Re: Efficient Grouping
by Thelonius
in thread Efficient Grouping
by meetraz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |