my %conf; while () { chomp; my ($k,$v) = $_ =~ /^([^=]+)=(.*)$/; $conf{$k} = $v if $k; }