Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Efficiency of map vs. more verbose basic/fundamental code

by marquezc329 (Scribe)
on Oct 04, 2012 at 20:52 UTC ( [id://997326]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    foreach $key (sort keys %h) { 
       print "$key: $h{$key}\n"; 
    }
    
  2. or download this
    print map "$_: $h{$_}\n", sort keys %h;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://997326]
Approved by marto
Front-paged by ELISHEVA
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-26 00:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found