I'm sure you're seeing some problem but I'm pretty sure it isn't what you're telling us.
First off, the code you posted won't work - it's not complete. See How do I post a question effectively?.
I've grep'd Net::Telnet for the error message "File Handle isn't open on Login" you're presumably getting from you first "return( 251, $msg );" line as there really is no other place in the code I see that could generate that message. I further grep'd my entire perl/lib, perl/site/lib and perl/vendor/lib directories for that message in some module and I don't find it.
Please provide (brief) working code that demonstrates the problem.
In the meantime, show us a screen cut/paste of a console Telnet to the device in question so we can rule out connecting to the device as an issue and prove it's the Perl code.