Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: One liner to subtract by 2

by choroba (Chancellor)
on Jul 24, 2013 at 14:05 UTC ( #1046122=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -pe 's/([0-9]{10})$/sprintf "%010d",$1-2/e'
    
  2. or download this
    perl -pe 's/([0-9]{10})$/sprintf "%010d",$1-2/e if /^0TONY/'
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1046122]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2016-02-13 07:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (420 votes), past polls