Cross David - dcross <[EMAIL PROTECTED]> writes:

> Thought you might be interested in this post from our frind the Hereford
> Killer. Someone posted some code that used for(;;) loops. And this was bk's
> response:
> 
> <begin_quote>
> Erm, My eyes keep darting to your FOR loops. For is mainly used in
> javascript, and perl doesnt handle them, mainly because of the semicolons
> used to split the operations. Instead of for, use foreach, because thats
> close to the perl equivalent of for. I'm not sure exactly what that would
> translate to into perl, but if you want to do something in a foreach loop,
> it would look like 
> 
> foreach $ArrayItemYouNeedToChange (@TheArray) { 
> #do this 
> } 
> 
> Remember, for loops are for JS, not perl. You cant use semicolons in perl,
> unless theyre before a carriage return. 
> <end_quote>
> 
> And this from someone who describes himself as a "PERL Master".

I haven't laughed so much since Date::MMDDYY...

-- 
Piers Cawley
www.iterative-software.com

Reply via email to