in reply to Using SprintF in S & R
The right hand side of s/// does not execute code unless you use the "e" modifier.
So, s/\<time\>(\d+)\<\/time\>/\<time\>sprintf("%06d",$1)\<\/time\>/e is what you want. Note the "e" after the last slash.
Edit to correct placement of "e" modifier. Thanks Laurent. Too many slashes and backslashes!