- or download this
use warnings;
use strict;
...
my $self = shift;
return $self->{name};
}
- or download this
sub drive_type {
my ( $self, $drive ) = @_;
...
}
return $self->{'engine_cap'};
}
- or download this
} # end of Car class
...
print join " " => $car->car_name,
$car->drive_type, $car->body_type, $car->engine_cap;