in reply to Re: Copy hash's key to an array
in thread Copy hash's key to an array

Deak Monks,

Thank you very much every one. But is there any other efficient way besides keys and pushing individual keys. I am just being here a bit curious because itz perl and here there's always another way.

Replies are listed 'Best First'.
Re^3: Copy hash's key to an array
by aaron_baugher (Curate) on Oct 21, 2011 at 18:28 UTC

    I'm sure there are other ways. You could treat the hash as an array, for instance, and use a loop to pull out all values with even-numbered indexes, starting with zero. But I doubt any other way could be as efficient as the built-in 'keys' function.

Re^3: Copy hash's key to an array
by JavaFan (Canon) on Oct 21, 2011 at 21:11 UTC
    I'm sure Perlmonks could find a few million silly ways to extract the keys from a hash without using the four character buildin called keys.

    But what's the point?