in reply to Re: Array loops and assignments
in thread Array loops and assignments
@ww Thanks for your response. Yes, I did declare the variables and used strict,warnings etc. Didn't paste the entire code - just the array part. My bad!
The requirement is that 8 elements of the array be stored in separate attributes. So instead of doing a single-assignment for each attribute, I was hoping to just put it in a loop and assign it to the corresponding variable.
so, instead of: var1 = arr; var2 = arr; I was hoping to do: var[i] = arr[i] in a loop.
Am sure there are more elegant and direct approaches to this. Thanks again. Will check the docs.