in reply to Telnet.pm error

It looks like you might be running against Cisco switches. Try Net::Telnet::Cisco if that's the case. If it hangs at the sh vlan command it could be either a problem with paging or the prompt isn't set correctly