in reply to (boo)Re: Loop Control : REDO
in thread Loop Control : REDO

From Programming Perl, 3rd Edition Page 118
The foreach keyword is just a synonym for the for keyword, so you + can use foreach and for interchangeably...

                - Ant

Replies are listed 'Best First'.
Re: Re: (boo)Re: Loop Control : REDO
by boo_radley (Parson) on May 02, 2001 at 18:51 UTC
    well, YES, that is true.
    however, from perl's documentation on continue :
    If there is a continue BLOCK attached to a BLOCK (typically in a while or foreach)...

    which made me believe you could tack continues on to any block all willy nilly. This isn't the case, though.
      Yeah... I think they just use foreach as a readability thing... but they are the exact same... I haven't used foreach since I saw that... so much extra typing :)
                      - Ant