Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Mini-Tutorial: Working with Odd/Even Elements

by duelafn (Parson)
on Jul 10, 2009 at 11:15 UTC ( [id://778888]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use List::Util qw/sum/;
    say for map_pairs \&sum, 1..10;
    
  2. or download this
    use YAML;
    my @array = ( foo_name => " Bob Smiley ", foo_age => " 32" );
    map_pairs { $a =~ s/foo_//; s/^\s+//, s/\s+$// for $b; } @array;
    ...
    map_pairs { $a =~ s/foo_//; s/^\s+//, s/\s+$// for $b; } %hash;
    
    print Dump \%hash;
    
  3. or download this
    ---
    - name
    - Bob Smiley
    ...
    ---
    foo_age: 32
    foo_name: Bob Smiley
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-16 06:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found