Rob Dixon <[EMAIL PROTECTED]> writes:
> [EMAIL PROTECTED] wrote:
>> "Jeff Pang" <[EMAIL PROTECTED]> writes:
>>
>>> On Dec 3, 2007 10:12 AM, <[EMAIL PROTECTED]> wrote:
>>>
>>>> #!/usr/local/bin/perl -w
>>>> use strict;
>>>> use warnings;
>>>> my @ar = ();
>>>>
>>>> for(@ar){
>>>> print "$_\n";
>>>> }
>>>>
>>>> But running that script just does nothing but gleefully print a
>>>> newline.
>>>
>>> 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.
>
> I would say it was more like
>
> $total = $total + $value;
Yeah.. I'm not sure what you mean there but I see I'm on the wrong
track. I didn't think it was a big deal to start with... just struck
me as wrong on first blush... after thinking about it more I can see
where that is not a good place for warnings.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/