in reply to Re: looking for a good idiom: return this if this is true
in thread looking for a good idiom: return this if this is true

Don't do that; $_ is a global.

Replies are listed 'Best First'.
Re^3: looking for a good idiom: return this if this is true
by adamk (Chaplain) on Mar 07, 2005 at 13:49 UTC
    I concur.

    And I've previously found when I was doing a micro-optimisation effort somewhere, that $_ is also relatively slow to assign and then read from, compared to the temporary variable.