in reply to Using $_ as a temp var, especially in functions

Use it, localized, if it makes sense as a pronoun. If it is the primary data source and functions that default to it as argument are needed, use it.

Localizing it is not the same as creating a lexical. By localizing, you avoid damaging the wider scope with an innocent-looking sub call.

After Compline,
Zaxo

  • Comment on Re: Using $_ as a temp var, especially in functions