What's the scottscript script??? It is called by a system, function and executing in a self space.
If this script print on STDOUT, for this script scottscript,STDOUT is the screen, don't the file (is the file for the script viewed in this mail). P.S. Sorry for my bad english . Walter >Can anyone explain to me why the output of the script called within this >script prints the output to the screen and not to the client connected >to the socket. > >Many thanks > >#!/usr/local/bin/perl -w > >use Socket; > >if (!@ARGV) { >print "Script cannot be called with no Port Number.... doh!\n"; >} else { >$server_port = $ARGV[0]; > >socket(SERVER, PF_INET, SOCK_STREAM, getprotobyname('tcp')); > >setsockopt(SERVER, SOL_SOCKET, SO_REUSEADDR, 1); > >$my_addr = sockaddr_in($server_port, INADDR_ANY); > >bind(SERVER, $my_addr) or die "couldnt bind"; >listen(SERVER, SOMAXCONN) or die "cant listen"; >while (accept(CLIENT, SERVER)) { >*STDOUT = *CLIENT; >$input = <CLIENT>; >chomp $input; >chop $input; >system ("./scottscript $input"); >#open (OUTSTUFF, ">checkdis"); >#print OUTSTUFF $input; >#close OUTSTUFF; >} >close(SERVER); >} > > > >Regards, >Scott L Ryan >OneTel.Net ISP Engineer > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]