You simplified it a lot by dropping $maxdigs. Put that back in and I doubt you'll have saved more than a keystroke or two. :) But thanks for the substr method; I like that.
When I saw the name chip, I wondered if it was you. Welcome to Perl Monks! I've run into your work many times and have been impressed.
If you know you don't need extra leading zeros, then you can also get away with:
Man, I shouldn't attempt this much thinking before breakfast.