Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Using SprintF in S & R

by dirtdog (Monk)
on Jul 11, 2017 at 17:41 UTC ( [id://1194845]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    perl -i.bak -pe 's/\<time\>(\d+)\<\/time\>/\<time\>sprintf("%06d",$1)\
    +<\/time\>/ if /\<time\>(\d{5})\<\/time\>/'  <file>
    
  2. or download this
    <time>sprintf("%06d",10001)</time>
    
  3. or download this
    
    <time>010001</time>
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1194845]
Approved by 1nickt
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-25 05:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found