sub new { my ( $invocant, @lines ) = @_; # Take the lines in orden # The line below is a bit cargo cultish, and I won't go into the reason here # Super search for clone / constructor for more info / enlightenment # my $class = ref($invocant) || $invocant; my $self = { shape => \@lines, }; return bless $self, $invocant; } sub print_shape { my $self = shift; my @lines = @{ $self->{ 'shape' } }; foreach my $line( @lines ) { print $lines, "\n"; } }