in reply to Re^3: Lose first element of hash in hash ..
in thread Lose first element of hash in hash ..

While most of the suggestions are good, I take objection with two:

What's wrong with using barewords as hash keys? The quotes mostly clutter up the syntax, and it's rare that you want a function call inside a hash key access.

Instead of using global / glob filehandles and closing them manually, I recommend to use lexical filehandles, which will close automatically when the enclosing scope is left.

  • Comment on Re^4: Lose first element of hash in hash ..

Replies are listed 'Best First'.
Re^5: Lose first element of hash in hash ..
by Svante (Sexton) on Mar 11, 2010 at 12:43 UTC

    OK, I retract the bareword comment; I guess it's a matter of circumstance and personal taste.

    I also always use lexical filehandles, but I habitually close them as soon as I'm done with them. This can be done with an explicit call to close, or by introducing a separate scope. The latter form is especially recommended when locally modifying $/ and such things.