in reply to -visible => 0,

UPDATE your @cloned_balls is defined in the if portion of the if-else clause, it is no longer valid in the else portion. Define my @cloned_balls before the if-else starts.

You should give a working snippet to show your problem. Your error says that @cloned_balls is "out-of-scope", which means that where you are trying to set the visibilty on $cloned_balls[0] , it isn't there. When I look at your code, there is a closing } for the the sub balls, before you try to access @cloned_balls. So unless you make @cloned_balls a global, it won't be seen outside the sub balls().

Try printing out @cloned_balls right before you try to set visibilty, and you will see it isn't there. It is only declared withing the sub balls().


I'm not really a human, but I play one on earth. flash japh

Replies are listed 'Best First'.
Re^2: -visible => 0,
by Anonymous Monk on Apr 16, 2006 at 10:34 UTC
    Thanks again zentara... I think I'm getting what you are saying, so I'll give it a go later on today...