in reply to hash size
"size of a hash" isn't really well defined. You can get the number of keys, or the number of values pretty easily. (does a key w/o a defined value count? It might not for some purposes). You can cut down the keystrokes on your method with something like the following:
print "This hash holds ". scalar keys %somehash . " keys\n";
HTH
perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); +$rose = "smells sweet to degree $n";*other_name = *rose;print "$other +_name\n"'
|
|---|