in reply to clever zero _right_ pad?

This is twisted (sorry - couldn't resist the pun) but:
scalar reverse sprintf("%010s", scalar reverse $string);
should do it.