I guess as another point, with strict; and warnings; active, when reading from the predefined DATA file handle, you will get a warning if you don't have the while (defined (my $line =<DATA>)){} syntax, that is because a line with just "0" could evaluate to "false". On "real file handles" the action is a bit different - Perl is very good at "doing what I meant" and the defined() is implicit. Perl is a huge language and abounds with little fine differences.
In reply to Re^3: how do I "initialize" $_
by Marshall
in thread how do I "initialize" $_
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |