http://qs1969.pair.com?node_id=11134447


in reply to Re: Using 'keys' on a list
in thread Using 'keys' on a list

Thanks for the response =).
keys doesn't operate on a list
Do you know why this might be? Maybe because strictly speaking, only hashes have keys, and lists don't? But then perl isn't usually that strict e.g. as you mentioned from 5.12 keys can operate on an array. I ask because I was hoping to be able to do this in one line. It's not a big deal but I'm kind of curious to see if it's possible.