The @Array_Vals goes out of scope as (each iteration of) the loop ends. If you use strict (and you always should - especially while learning) then that code won't even compile.
In reply to Re: declare my variable in loop
by hippo
in thread declare my variable in loop
by gauss76
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |