in reply to Re: re-key a hash ( Best (-: )
in thread re-key a hash

What's the point of your delete? You're assigning a completely new list to that hash in the end anyway.

It certainly doesn't seem like the "best" version to me, at least in terms of my usual metric: self-documentation.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re^3: re-key a hash (why delete)
by tye (Sage) on Aug 03, 2004 at 01:11 UTC

    Since ccn didn't answer your question... The delete is there to make the calculation of the new keys ( (keys %hash) - 1 ) work.

    - tye        

Re^3: re-key a hash
by ccn (Vicar) on Aug 02, 2004 at 22:33 UTC

    Ok, it's not for production use, but it's fun. I like such stuff.