You could push or simply use a counter (which keeps the code cleaner). Just one idea anyway :).while ($line = <FH>) { chomp $line; next if $line =~ /^$/; next if $line =~ /[#{}]/; $line =~ /^\s*(\S+)\s*(\S+)/; # new portion $host[$counter]{$1} = {$2}; }
In reply to Re: array of hashes use
by bioinformatics
in thread array of hashes use
by salatconed
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |