in reply to problem : return an array list
To differentiate between arrays when passing to / receiving from a sub, etc. you need to use array references so that the first array doesn't gobble up the rest.
###in textgrab.pm , 3 array lists contains different data sub GetZone{ . . . return \@Zone, \@reverseZone, \@reverseZoneShow; } ### in main.pl ... my $obj=new textgrab; ($Zone, $RevZone, $RevZoneShow)=$obj->GetZone(); # Can now accessed as @$Zone, etc., or manually # reassign them with my @Zone = @$Zone;
For more details, see also How do I pass more than one array to a subroutine? at Perlfaq Prime.
--k.
|
|---|