Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Merging an array into an AoH

by BrowserUk (Patriarch)
on May 21, 2004 at 20:09 UTC ( #355450=note: print w/replies, xml ) Need Help??

in reply to Merging an array into an AoH

If you don't mind throwing away @results, you could do

$_->{id} = shift @results for @box;

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail

Replies are listed 'Best First'.
Re: Re: Merging an array into an AoH
by rjray (Chaplain) on May 22, 2004 at 00:36 UTC

    Except that should be:

    $_->{value} = shift @results for @box;

    He's assigning the data from @results to the value key. id is already in use.

    (Still, the best solution of the lot :-).


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2022-06-29 09:01 GMT
Find Nodes?
    Voting Booth?
    My most frequent journeys are powered by:

    Results (96 votes). Check out past polls.