http://qs321.pair.com?node_id=938586


in reply to How to create hash out of an array elements?

This works:
use Modern::Perl; my %sizes = ('function' => 100, 'another function' => 200); say "The size of function is $sizes{'function'}";
Output:
The size of function is 100

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James