Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: access array of hash?

by Happy-the-monk (Monsignor)
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 examining the Monastery: (5)
As of 2014-07-31 05:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (245 votes), past polls