in reply to Re: One liner to subtract by 2
in thread One liner to subtract by 2
You'll lose leading zeros with that.
-derby
update: so perl -pe 's/([0-9]{10})$/sprintf("%010d", $1-2)/e'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: One liner to subtract by 2
by choroba (Cardinal) on Jul 24, 2013 at 14:10 UTC | |
by Anonymous Monk on Jul 24, 2013 at 14:28 UTC | |
by choroba (Cardinal) on Jul 24, 2013 at 14:30 UTC |
In Section
Seekers of Perl Wisdom