package ABC; { sub new { my $hashref={}; my @array=(); my $arrayref=[]; $class=$_; bless ($hashref,$class); bless (@array,$class); bless ($arrayref,$class); return $hashref, @array, $arrayref; #I think I can only return one of these three data structures but not all, right? } sub get { #To access $hashref, @array, and $arrayref } sub set { #To set $hashref, @array, and $arrayref } } 1; #main $object1=ABC->new(); #assuming ABC class returns $hashref $object2=ABC->new(); #assuming ABC class returns @array $object3=ABC->new(); #assuming ABC class returns $arrayref