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
In reply to Re: Re: Re: Creating an Intermediate Perl Programming Curriculum
by revdiablo
in thread Creating an Intermediate Perl Programming Curriculum
by Steve_p
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |