Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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}}; }

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: (8)
As of 2016-06-26 00:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (327 votes). Check out past polls.