# Allows for arbitary number of lines # (as long as they are sequentially numbered from 1) sub print_shape { my $self=shift; my $em=''; for (my $i=0; $i{shape}}); $i++) { $em = 'print $self->{shape}->{line' . ($i+1) . '}."\n"'; eval($em); } }