use strict; use wanings; #### for (@{$your_hash{data}}) { if ($_->{ID} == $current_job_id) { # Do your checks on $_->{State} here last; } }