good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: incrementing array nameby particle (Vicar) |
on Jun 23, 2003 at 12:50 UTC ( [id://268138]=note: print w/replies, xml ) | Need Help?? |
since you're accessing a global variable in a subroutine, @a will be appended to each time. you need to create a lexical variable, and return it from the subroutine. something like:
~Particle *accelerates*
In Section
Seekers of Perl Wisdom
|
|