sub read_short { my ($self) = @_; my $sys_short_length = $Config{shortsize}; my $short = unpack('S', $self->read_buffer($sys_short_length)); return $short; } # elsewhere in the code: print "ping: " . $self->package_reader->read_short() . "\n";