in reply to Re: Variable scope
in thread Variable scope

my @array; should occur within the do loop before either statement occurs, neither of which should use my.