my $obj = OOtest->new(); # NOT foreach my $tmp ( @{ $obj->list() } foreach my $tmp ( @{ $obj->get_array() } ) { # process list }