in reply to Net::Telnet problem
I've not used it myself, but Expect.pm might be One Way To Do part of what you want.
vladdrak already mentioned Net::Telnet::Cisco so I won't go into that. cheers, ybiC