$string = 'TEST'; print substr $string . '0'x8, 0, 8; TEST0000 [download]
In reply to Re: sprintf question by BrowserUk in thread sprintf to zero-pad on the right by Anonymous Monk