Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 chanting in the Monastery: (7)
As of 2016-06-26 08:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (328 votes). Check out past polls.