in reply to Re: (MeowChow) Re2: When does $_ get used?
in thread When does $_ get used?

Actually, Perl treats filehandle input within while loops as a special case, to avoid exactly this problem, and to allow for a more natural idiom. To quote the relevant bit of arcana from the POD:
  
while (my $line = <STDIN>) { print $line }
In these loop constructs, the assigned value (whether assignment is automatic or explicit) is then tested to see whether it is defined. The defined test avoids problems where line has a string value that would be treated as false by Perl, for example a ``'' or a ``0'' with no trailing newline. If you really mean for such values to terminate the loop, they should be tested for explicitly...

   MeowChow                                   
               s aamecha.s a..a\u$&owag.print