Your program reads data from STDIN. The line you mentioned "$string = <STDIN>;" works if your input is a single line. For multiline input, you need to devise a way to stop reading and start processing.
There are many ways to do this:
Abdulaziz Ghuloum;;myemail@mycompany.com;;Subject Hereinstead of
From: Abdulaziz Ghuloum Email: myemail@mycompany.com Subject: Subject HereThis way, your code can easily extrace all message components. This method only works if the message is small and if you can always find a unique separator (";;" in the example I provided).
Undefining $/ should cause you trouble as your program will read waiting for EOF which might not happen unless the client closes writing to the socket.
Hope this helps,,,
Aziz,,,
In reply to Re: inetd server problem
by abstracts
in thread inetd server problem
by evilstevel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |