I guess it's because not every line is interesting. Suppose you want to find the line numbers where a token is found in a collection of files, but don't care about comments, why would you want to keep array elements which are uninteresting? You'd need to filter them out later anyway, with something like "grep { @$_ } @list". Using "keys %list" is altogether easier.
In reply to Re: Re: Larry Gets The Colon. (selective addition of an arrayref to a hash) (code)
by bwana147
in thread Larry Gets The Colon. (selective addition of an arrayref to a hash) (code)
by deprecated
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |