Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: access array of hash?

by Happy-the-monk (Abbot)
on Mar 22, 2012 at 20:21 UTC ( #961093=note: print w/ replies, xml ) Need Help??


in reply to access array of hash?

the answers are in perldoc perldsc and perldoc perllol

Assuming your array is called @array, this might do it:

for my $i ( 0 .. $#array ) { next unless $array[$i]->{ServiceType} eq 'FEDEX_2_DAY'; print $array[$i]->{ship_cost} and last; }

Cheers, Sören


Comment on Re: access array of hash?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://961093]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (15)
As of 2015-07-30 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls