in reply to Re^4: Playing with non-localized $_ in nested loops. in thread Playing with non-localized $_ in nested loops.
There are actually two pieces of dwimmery going on; first, if a readline or a glob is the only thing in a while condition (whether a statement modifier or while statement), it gets an implicit $_ =. Next, if a while condition is a scalar assignment from a readline, readdir, glob, or each, the whole condition gets an implicit defined() wrapped around it, so the loop continues on "0" or "".
|