foreach(@{$self->{endpoints}}){ my $wheel = $self->{endpoints}->[$_]{wheels}; my $pname = $self->{endpoints}->[$_]; if($wheel->ID == $wheel_id){