sub zeropad () { my ($num,$padding) = @_; $padding ||= 2; return sprintf("%0" . $padding . "d",$num); }