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

Re^4: Hash assignments using map

by chargrill (Parson)
on Feb 24, 2007 at 16:47 UTC ( #601893=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -le '$c = "a"; print ++$c'
    b
    
  2. or download this
    $ perl -Mstrict -MData::Dumper -we 'my @a = qw(a b c d); \
      my %h = map { $_++ } @a; print Dumper \%h'
    ...
              'c' => 'd',
              'a' => 'b'
            };
    
  3. or download this
    s**lil*;  $*=join'',sort split q**;  s;.*;grr; &&s+(.(.)).+$2$1+; $; =
    qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2022-05-22 07:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (80 votes). Check out past polls.

    Notices?