package Farm; use strict; use warnings; sub new { my $className = shift; my $self = { $farmName,"", "farmMamals",(), "farmBirds",() }; bless $self,$className; return $self; } sub addFarmBirds { my self =shift; my tempBirds=[] ; # right way of initialising an array ?? if (@_){ @tempBirds=@_}; #now for the part i dont understand $self->{farmBirds} = @tempBirds; return } }