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