in reply to hash and it's keys...

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'}.