[vienna.pm] foreach (my, local)

Roland Bauer roland.bauer at fff.at
Tue Jul 11 17:00:56 CDT 2000


* * * vienna-pm-list * * *


> bzw. was jetzt wirklich genau passiert, wenn eine Schleifen-Variable
> deklariert wird. Any takers?

for macht mehr als das while.

ein aspekt aus camel seite 100:
"if LIST is an actual array ..., you can modify each element of the
array by modifying VAR inside the loop."

oder, perldoc perlsyn:
"If any element of LIST is an lvalue, you can modify it by modifying
VAR inside the loop. That's because the foreach loop index variable is an implicit
alias for each item in the list
that you're looping over."

Roland

###
You are subscribed to vienna-pm-list as Roland Bauer <roland.bauer at fff.at>
http://www.fff.at/fff/vienna.pm/



More information about the Vienna-pm mailing list