So, you'd prefer to avoid assignment,
I don't know what side effects you are talking about for assignments.
print statements,
I'm not fond of how print changes $!, but it's much more convenient than the alternative. There's also a very high level of consistency with other like functions. system is where it goes overboard ($?).
regular expressions,
I don't use $1, etc. I use the match operator in list context instead.
and even fetching the value of a variable?
Memoizing is a harmless side-effect.
I see as many side-effects as the code using 'for'
As I see it,
The purpose of for is to affect something (necessarily external) repeatedly.
The purpose of map is to transform a list.
You may see things differently, but it was clear that I was explaining how I see things.
In reply to Re^3: map in void context
by ikegami
in thread map in void context
by dharanivasan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |