while (<>) { print "got $_"; }
Update: see perlop2:1 got 1 2 got 2 0 got 0 5 got 5
In these loop constructs, the assigned value (whether assignment is automatic or explicit) is then tested to see if it is defined. The defined test avoids problems where line has a string value that would be treated as false by perl e.g. ``'' or ``0'' with no trailing newline.
In reply to Re: Re: How to trace a dying process
by ctilmes
in thread How to trace a dying process
by Notromda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |