cdp@hertz.njit.edu (Chris Peckham) (01/25/91)
I have a question that I hope is easy to answer :-) I have a script written in perl that I would like inetd to startup when a connection to a particular socket is made. For example: telnet foobar socket_number If I run the perl script interactively by just starting it up, all is well and everything works as it should. If I attempt to run the perl script by using a telnet command as above and inetd starts it up, errors are returned in the debug mode as below: }Loading DB routines from perldb.pl 3.0.1.6 91/01/11 } }Enter h for help. } }main'(/ham/server.sh:38): do help(); } DB<1> Unrecognized character \015 ignored at (eval) line 1. } } DB<1> Unrecognized character \015 ignored at (eval) line 1. }parse error in file (eval) at line 1, next 2 tokens "h } } DB<2> Unrecognized character \015 ignored at (eval) line 1. }parse error in file (eval) at line 1, next 2 tokens "h } If a sh script is used in place of the perl script, the telnet works (but I do not want to use sh :-) ). This tells me that the /etc/services and /etc/inetd.conf entries are correct .? Any ideas ? Something I missed in the man page ? Why is there a \015 (ctrl-O) in the input stream ? My perl book should be here any day now - Thanks for any help- Chris
rodney@sun.ipl.rpi.edu (Rodney Peck II) (01/25/91)
In article <2141@njitgw.njit.edu> cdp@hertz.njit.edu (Chris Peckham) writes: > >Any ideas ? Something I missed in the man page ? Why is there a \015 (ctrl-O) >in the input stream ? That's not a control-O. Think octal. It's a control-M, thirteen base ten, a <CR>. As in LFCR. Networks seem to do that sort of thing. -- Rodney
cdp@hertz.njit.edu (Chris Peckham) (01/26/91)
In article <2141@njitgw.njit.edu> cdp@hertz.njit.edu (Chris Peckham) writes: > >I have a question that I hope is easy to answer :-) > >If I run the perl script interactively by just starting it up, all is well and >everything works as it should. >If I attempt to run the perl script by using a telnet command as above and >inetd starts it up, errors are returned in the debug mode as below: I forgot to flush the output buffers with $| As the man page says, "When you want your pipes to be piping hot !" Oh well... I guess I need to read the manual some more :-)