Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Parsing attributes in one line using map

by jhourcle (Prior)
on Sep 25, 2006 at 13:38 UTC ( #574732=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -MData::Dumper -le 'my %oddcubes = map { $_%2 ? ($_ => $_**3) : (
    +) } 1..9; print Dumper \%oddcubes'
    $VAR1 = {
              '1' => 1,
    ...
              '9' => 729,
              '5' => 125
            };
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2021-01-28 00:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?