There's more than one way to do things | |
PerlMonks |
Re^2: Need to calculate IP addressby haukex (Archbishop) |
on Dec 28, 2017 at 19:34 UTC ( [id://1206353]=note: print w/replies, xml ) | Need Help?? |
s/\d+$/ $& ^ 1 /er A neat solution, of course, but unfortunately it doesn't meet the OP's specs: .5 becomes .4 and .6 becomes .7.
In Section
Seekers of Perl Wisdom
|
|