my @loop; #fill in the array @loop with hash references from @allow_edit... foreach (@allow_edit){ my($name, $value) = split /=/,$_; push @loop, {$name=>$value}; }