whenever you can one, you can also use the other instead.
Almost.
>perl -le"sub for { print 1 } sub foreach { print 2 } &for;" 1 >perl -le"sub for { print 1 } sub foreach { print 2 } &foreach;" 2
and
>perl -le"print 'for';" for >perl -le"print 'foreach';" foreach
This post is not to be taken seriously :)
In reply to Re^2: using foreach with a regex
by ikegami
in thread using foreach with a regex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |