in reply to CMD Command

You can (and probably should) use the diagnostic features provided by Net::Telnet.