> The problem I'm having is that it is skipping the next record > since inner loop read the next start line. I'm sure there > must be a better way. I will appreciate anyone suggesting a solution.
Try this: my (%hash, $acc); while (my $line = <FH>) { chomp ($line); $acc = $1 and next if ($line =~ s/^>(\S+)//); push @{$hash{$acc}}, $line; } -- Mark Thomas [EMAIL PROTECTED] Internet Systems Architect DigitalNet, Inc. $_=q;KvtuyboopuifeyQQfeemyibdlfee;; y.e.s. ;y+B-x+A-w+s; ;y;y; ;;print;; _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs