my @temp; while() { chomp; next if(/^$/); #Skip blank lines my ($HOSTNAME,$IP) = split(/\|/); push(@temp, {HOSTNAME => $HOSTNAME,IP => $IP}); }