"Jeff Pang" <[EMAIL PROTECTED]> writes: > On Dec 3, 2007 12:51 PM, <[EMAIL PROTECTED]> wrote: >> "Jeff Pang" <[EMAIL PROTECTED]> writes: >> > mhh? It won't print a newline, it even won't print anything. >> > b/c @ar is empty, for(...) doesn't go into it, 'print' won't be happened. >> >> Yeah your right... (what was I thinking...) but my point was that it >> seems perl should say something about this. It seams at least as >> significant as trying to use an undeclared var. >>
> which value was undeclared? the "$_" one? this is a built-in variable > in perl, it doesn't need to be declared. > anyway, you didn't use an undeclared value, so perl won't warn it. No, no, I didn't make myself clear. I'm saying running into a for loop array that has no value seems to me to be at least as significant as running into a variable that is undeclared. But the undeclared var will invoke a warning while the empty AR in a for loop will not. But someone has already answered that Larry Wall and all the perl devel people have run into many places were choice had to be made about issuing warning.... The empty for loop didn't make the cut. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/