in reply to Need to calculate IP address
this just leaves '$bgp_ip' blank
Sorry, I can't reproduce this, your code actually works for me. Perhaps you just made a typo? Always Use strict and warnings! However, at the moment the code is doing the same as tybalt89's XOR solution (Update: at least on your sample input that is) - if you want the logic to be the way you describe (.5 becomes .6 and vice versa), you need to reverse the +/- operations. On the other hand, tybalt89 made a good point here - are you sure about the logic you described?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Need to calculate IP address
by ddrew78 (Beadle) on Dec 28, 2017 at 19:52 UTC | |
by haukex (Archbishop) on Dec 28, 2017 at 20:04 UTC |