Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: One liner to subtract by 2

by rjt (Deacon)
on Jul 24, 2013 at 14:08 UTC ( #1046124=note: print w/replies, xml ) Need Help??


in reply to One liner to subtract by 2

echo 0TONYHLDGS201307240901201307240000000496 | perl -pe 's/(\d{10})$/sprintf("%01 0d",$1-2)/e'
0TONYHLDGS201307240901201307240000000494

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1046124]
help
Chatterbox?
[shmem]: Re^5: Understanding endianness of a number - nice! "zigamorph" will be the host name of the VM I'll set up to debug Microfocus COBOL/perl stuff :-D

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2017-07-24 10:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (350 votes). Check out past polls.