[Israel.pm] Can anyone explain my mistake ?

Amir E. Aharoni amir.aharoni at gmail.com
Wed Jun 10 05:49:23 PDT 2009


On Wed, Jun 10, 2009 at 15:47, Gabor Szabo<szabgab at gmail.com> wrote:
> On Wed, Jun 10, 2009 at 3:28 PM, Amir E. Aharoni<amir.aharoni at gmail.com> wrote:
>> 2009/6/10 Berler Chanan <chananb at centerity.com>:
>>> In the real world (in my way of thinking)
>>> Foreach should have interpreted into a 'for' loop
>>>
>>> Means:
>>> foreach $elm (@elm_arr) ==> should have been: for ($index = 0; $index >=
>>> $#elm_arr; $index++) { $elm = $elm_arr[$index]; ..... }
>>
>> ...But then it would be written in C.
>>
>> If you want to write it in Perl, use strict.
>
> In general it is a good idea to use strict but in this case it would
> have not helped.

Not by itself, of course. It would help finding the other problem.

-- 
אמיר אלישע אהרוני
Amir Elisha Aharoni

http://aharoni.wordpress.com

"We're living in pieces,
 I want to live in peace." - T. Moore


More information about the Perl mailing list