my %o; open my $in, "abc.properties" or die $!; while(<$in>) { $o{$1}=$2 while m/(\S+)=(\S+)/g; } close $in;