You either mean to use for my $key ( keys %hash ) { ... } or while( my $key = each %hash ) { ... }. You get the number of keys in the hash when you use it in a scalar context. See perldoc -f keys. And also @hash{'one'} is wrong; that's a one key hash slice, when what you really mean is $hash{'one'}.
In reply to Re: hash and it's keys...
by Fletch
in thread hash and it's keys...
by stan2004
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |