Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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
Replies are listed 'Best First'.
Re^2: merging two hashes
by martin (Friar) 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 wandering the Monastery: (3)
As of 2015-07-28 03:33 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 (252 votes), past polls