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?
In reply to Re: Need to calculate IP address
by haukex
in thread Need to calculate IP address
by ddrew78
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |