bit. Under normal circumstances, the array is flattened into a list and you can then mess with @array safely. However... there's an optmization in perl such that if the only thing in the list is a plain array then perl doesn't flatten, it just whips through the array, and modifying the array has... Interesting Results.for (@array)
If you want, you can throw another set of parens around @array to force it to be a list, then you can mess with it as much as you like within the loop without really messing things up.
In reply to Re: Strangness with arrays
by Elian
in thread Strangness with arrays
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |