in reply to Re: Perl oddities
in thread Perl oddities
Update: Nonsense below, I misread the post.
It would be much more useful, or sensible, if hash in a scalar context returned the number of keys:As soon as you try to use it as a number, "2/8" will be numified to 2 so actually it does effectively return the number keys.
The number of buckets is some bonus info for free.perl -le '%h = (a =>1, b => 2); print %h+0' 2
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Perl oddities
by jmcnamara (Monsignor) on Mar 01, 2005 at 16:26 UTC | |
by fergal (Chaplain) on Mar 01, 2005 at 18:19 UTC |
In Section
Meditations