if($data_pair->{key} eq 'correct') { @correct = $data_pair->{value}; # overwrite @correct push @correct,$data_pair->{value}; # goes to the end of @correct unshift @correct,$data_pair->{value}; # goes to the front of @correct }