Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-10-02 04:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (48 votes), past polls