my %variables; for (@array) { my ($var, $value) = split /=/; $variables{$var} = $value; }