I don't see where you set the prompt
attribute of Net::Telnet object. As the documentation says,
The methods login() and cmd() use the prompt setting in the object to determine when a login or remote command is complete. Those methods will fail with a time-out if you don't set the prompt correctly.
Net::Telnet just doesn't know where the command output starts and where it ends, so it can't return you anything.
You can use $telnet->errmsg to get its error message:
When mode is "return" then the method generating the error places an error message in the object and returns an undefined value in a scalar context and an empty list in list context. The error message may be obtained using errmsg().
probably gets cleared after you call ->disconnect, so you see no error message.