#!/usr/bin/perl -w use strict; use Net::Telnet; my $user = 'foo'; my $passwd = 'bar'; my $t= new Net::Telnet(Host => '****.****.com', Errmode => "return"); $t->login($user, $passwd); print $t->errmsg, " login\n"; my @p=$t->cmd("dwho") or warn "ugh\n"; print $t->errmsg, " who\n"; print "\@p contains:\n", join("\n", @p),"End\n"; __END__ login who @p contains: sh: dwho: not found. End