#!/usr/bin/perl -Tw # This is a wrapper script that will use Expect # to telnet to the VIP changer for PHX and roll # in and out of prod for service reasons use strict; use Expect::Simple; my $obj = new Expect::Simple { Cmd => "telnet my.host.com verbose=1", Prompt => 'Enter Password', DisconnectCmd => 'quit', Verbose => 0, Debug => 0, Timeout => 100 }; $obj->send( my $cmd ); print $obj->before; print $obj->after; print $obj->match_str, "\n"; print $obj->match_idx, "\n"; print $obj->error_expect; print $obj->error; my $expect_object = $obj->expect_handle;