returns list having even number of elements. 'keys' works only on hashes. In your working example %hash is initialized with the list returned by 'map' and then 'keys' can do the job on %hash.map { $_ => 1 } @_
HTH
In reply to Re: Why does 'keys' need a named hash?
by pme
in thread Why does ‘keys’ need a named hash?
by ankitpati
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |