in reply to arrays in classes
The Perl way of doing things like this would be to define a car.pm module with a package car statement, which you would then incorporate into your program with a use car statement followed by my $car = car->new(). This subroutine, new(), would instantiate a hash, bless it so that it is now recognized to be “a car,” and return it to you.
And this is how we do “objects” in a language that really didn’t know anything about them ... that is, until someone invented Moose.
And now, please dis-regard everything that I just said, hold onto your hat, and click on that link at the end of the preceding paragraph ...