Skip to content

Instantly share code, notes, and snippets.

@chicks-net
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chicks-net/0f8f6e46835c4ac40dd8 to your computer and use it in GitHub Desktop.
Save chicks-net/0f8f6e46835c4ac40dd8 to your computer and use it in GitHub Desktop.
my $telnet = Net::Telnet::Cisco->new($Host =>$ip)
my $cmd = "show tech-support";
my $matchop = qr/(?mx:^% Unknown VPN
|^%IP routing table VRF.* does not exist. Create first$
|^%No CEF interface information
|^%No matching route to delete$
|^%Not all config may be removed and may reappear after reactivating
|^% ?This CLI is deprecated
)/;
my $bool_ret = $telnet->warnings($matchop);
# ....
@lines = $telnet->cmd( String => $cmd, Timeout => 90 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment