in reply to Re: Uninitialized string warning
in thread Uninitialized string warning
Actually, perldoc perlop, in the section on "I/O operators", is very explicit about it:
Ordinarily you must assign the returned value to a variable, but there is one situation where an automatic assignment happens. If and only if the input symbol is the only thing inside the conditional of a while statement (even if disguised as a for(;;)loop), the value is automatically assigned to the global variable $_, destroying whatever was there previously.(emphasis mine)
|
|---|