### In Boot.pm package Boot; use base qw( Shoe ); use strict; use warnings; # Boots are like Shoes, but have a heel. # (Heel stuff not shown, for brevity.) sub new { my $class = shift; my $self = $class->SUPER::new(); # ... return $self; } # Instance method that has to deal with a class variable. sub wear_out_sole { my $self = shift; Shoe->incr_num_holey(); print "Sole on this BOOT has been worn out.\n"; Shoe->how_many_holey(); } 1;