in reply to array of hashes use
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}; }
|
|---|