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

Re: merging two hashes

by jZed (Prior)
on Feb 08, 2006 at 21:03 UTC ( #528932=note: print w/ replies, xml ) Need Help??


in reply to merging two hashes

my @a; for my $key(sort keys %$s){ push @a,$_ for @{$s->{$key}->{1}}; }


Comment on Re: merging two hashes
Download Code
Re^2: merging two hashes
by martin (Pilgrim) on Feb 08, 2006 at 21:39 UTC
    That is an obsolete loop, jZed. Rather than: push @a, $_ for @b; I would write: push @a, @b;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2014-04-19 23:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls