~s/^(\d+)$/("0"x($optimal_length-length$1)).$1/e;
https://www.regexplanet.com/share/index.html?share=yyyyyvnphnr