Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Simplifying for loop and applying multiple push function

by qq (Hermit)
on Dec 14, 2005 at 22:09 UTC ( [id://516785]=note: print w/replies, xml ) Need Help??


in reply to Simplifying for loop and applying multiple push function

my %hash = ( 1 => 'one' , 2 => 'two' , 3 => 'three' ); no strict; map { push @{ ++$i % 2 ? 'one' : 'two'}, $_ } %hash; print "@one\n"; print "@two\n";

Another one-line attempt. But maybe it should count as two...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-03-29 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found