in reply to How to build a hash?

you can create an empty hash, and insert key-value pairs on it later, i.e. as you read them from STDIN:
my %hash; while(<>) { chomp; my ($key, $value) = split('=', $_); $hash{$key} = $value; }