Help for this page

Select Code to Download


  1. or download this
    use List::Util qw( sum );
    use YAML::Syck qw( Load );
    ...
      - F
      - G
      - H
    
  2. or download this
    require 'yaml'
    hash = YAML::load( <<EOT )
    ...
    
    ## Duuurh, Hash isa Enumerable so it has an inject itself
    or_even_count = hash.inject( 0 ) { | s, (k,v) | s += v.size }