My own preference in this case is almost always:
printf "keys=%d\n", 0+(keys %r);
I just like the brevity of that over scalar.
In reply to Re: keys(%hash) not in scalar context in printf
by liverpole
in thread keys(%hash) not in scalar context in printf
by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |