Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: access array of hash?

by Happy-the-monk (Canon)
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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://961093]
[shmem]: me sinks back into the armchair by the fire, smikes a pope and calls this a day.
[shmem]: just one proverb before dozing off: when dealing with a bear, hubris is suicidal
[shmem]: Old_Gray_Bear would nod, and go back to sleep, then - but he's been sleeping for a year now.
[erix]: "AngloZionist Empire"? "Stop the Empire's war on Russia?" WTF?

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2018-03-19 20:46 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (246 votes). Check out past polls.