ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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?
1. The symptoms are as follows, if I use the above code, then $line will be empty if I dont use the debugger (-d). If I do and step through the same code $line contains OK and the if statement matches and I get "Line: OK" printed to the screen.
Any other of the ~10 examples of Net::Telnet I have found on google gives me a "command timed-out at line X". The one I posted above I set errmode to return so that it would not die when it fails but then I get the symptoms I described above.
2. I tried adding warnings as you suggested and I then get these errors,
Use of uninitialized value in pattern match (m//) at ./fb4 line 16.
Use of uninitialized value in pattern match (m//) at ./fb4 line 17.
Adding strict and declaring my variables still gives same result.