Perl references and nested data structures should help you.
In reply to Re: 'my' Variable life cycle by olus in thread 'my' Variable life cycle by Anonymous Monk