while (<>) { chomp; (my ($key, $val) = split /:/) == 2 or next; }