Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: use of 'map'

by blazar (Canon)
on Jul 14, 2005 at 11:15 UTC ( #474826=note: print w/replies, xml ) Need Help??


in reply to use of 'map'

Yes, you can:
my @arr=map {$_, "=>$list{$_}"} keys %list;
This should do what your code does, but your code doesn't seem to match exactly your description (and it has an unnecessary assignment)...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2020-06-05 01:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (35 votes). Check out past polls.

    Notices?