in reply to accessing data in hash
Hi ccfc1986,
..I want to be able to loop through the data, and check the current JobID, when i find a match (say 33) i want to grab the State field and do a check against it..
You mean something like so:
ORprint map { $_->{State} if $_->{ID} == 32 } @{ $hash->{data} };
for my $state ( @{ $hash->{data} } ) { print $state->{State} if $state->{ID} == 32; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: accessing data in hash
by AnomalousMonk (Archbishop) on Mar 29, 2014 at 20:38 UTC | |
by kcott (Archbishop) on Mar 29, 2014 at 21:43 UTC |