It's not true that foreach doesn't return anything.
Sure it is. Otherwise, you would not have had to wrap your example for loops in a sub to try to make your point. If it returned something, you'd be able to write code like: @x = for (1) { 1 }; But, that's a syntax error. Why? Because statements don't return anything. Q.E.D.
-sauoq "My two cents aren't worth a dime.";
In reply to Re^6: Unhappy returns
by sauoq
in thread Unhappy returns
by tlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |