#!/usr/bin/perl print "Enter the IP address\n"; $tunip = ; chomp ($tunip); my $period="."; my @ip_fields = split(/\./, $tunip); my ($bgp_ip,$test_ip); if ($ip_fields[3] % 2) { $test_ip=$ip_fields[3]-1; } else { $test_ip=$ip_fields[3]+1; } $bgp_ip = $ip_fields[0].$period.$ip_fields[1].$period.$ip_fields[2].$period.$test_ip;