Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Need some help with Hashes and formatting

by LanX (Saint)
on Jun 25, 2014 at 13:09 UTC ( [id://1091188]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      DB<110> %hash = ("fred" => "flintstone", "dino" => undef, "barney" =
    +> "rubble", "betty" => "rubble");
    
    ...
              'dino' => undef,
              'fred' => 'flintstone'
            };
    
  2. or download this
      DB<115> $length = 0 + keys %hash
     => 4
    ...
         betty    =>    rubble
          dino    =>          
          fred    =>flintstone
    
  3. or download this
      DB<123> $template = "%10s\t=>%10s\n" x (0 + keys %hash)
    %10s    =>%10s
    ...
         betty    =>    rubble
          dino    =>          
          fred    =>flintstone
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-25 15:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found