Dumping$VAR1 = { 'data' => [ { 'ID' => 32, 'State' => 'Stopped' }, { 'ID' => 33, 'State' => 'Stopped' } #### foreach my $value (sort keys $states->{data}) { if ($value == 15) { $CurrentState = $states->{data->{'State}'}; print "In here because found state of 15\n"; print "CurrentState; [$CurrentState]\n"; } }