Net::Telnet with no prompt
I am writing a Perl script which connects to a socket and sends some standard AT command. I created the script first using Socket::INET but soon realised that the socket wasnt a raw data socket but actually ran Telnet.
I therefore started using Net::Telnet but I am having some problems here. I think the problem is because the telnet session does not give me a prompt so Net::Telnet times out. I tried changing the Prompt option to /^$/, //, "", and anything I can think of but I still cant get it to work. Can someone provide me with a sample of how to get Net::Telnet to work without needing a prompt, just do it on a per line basis?
This is what a normal connection would look like.
Nothing complicated, just send one line, receive one, send another, receive another etc.
I think I need to set cmd_remove_mode to 1 as well as the device echoes back everything I send it.
In worst case I will have to go back to Socket::INET but I would perfer not to as I then have to ignore garbage I get back and ignore every second response which is my own echo etc.
Thanks in advance!