in reply to Re: Creating an Intermediate Perl Programming Curriculum
in thread Creating an Intermediate Perl Programming Curriculum

Yes, that, and the ability to use for in a single statement like if and unless. For example:

s/foo/nofoo for @array;

Replies are listed 'Best First'.
Re: Re: Re: Creating an Intermediate Perl Programming Curriculum
by revdiablo (Prior) on May 04, 2004 at 16:31 UTC

    You can use foreach in the exact same manner. They are synonyms. One can always be used in place of the other:

    $ perl -le 'print foreach 1, 2, 3' 1 2 3