Help for this page

Select Code to Download


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