Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Generating Hash-of-List using map?

by cmv (Chaplain)
on Sep 23, 2013 at 16:19 UTC ( #1055327=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
    my %hash=map { /^(.*)-(\d+)$/; $1=>$2} @CELLS;
    
    print STDERR "hash DUMPER:\n", Dumper(\%hash), "\n";
    
  2. or download this
    hash DUMPER:
    $VAR1 = {
    ...
              'C' => '8',
              'B' => '6'
            };
    
  3. or download this
    hash DUMPER:
    $VAR1 = {
    ...
                       6
                     ]
            };
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-12-29 01:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (183 votes), past polls