#$switchip = "192.168.2.150" if $one;
#$switchip = "192.168.1.1" unless $one;
$switchip = $oldip;
-my $switch = switch_connect($switchip);
+my $switch = switch_connect($switchip)
+ or die "Could not connect to $switchip";
my $cmds1 = <<EOF
sys hostname es-3024