in reply to howto redirect STDOUT to $socket
Something along the lines of:
(untested).if( defined $fileno ){ open STDIN, "<&$fileno" or die "Couldn't open STDIN to the client socket: $!"; open STDOUT, ">&$fileno" or die "Couldn't open STDOUT to the client socket: $!"; } else { *STDIN= \*{ $sock }; *STDOUT= \*{ $sock }; } STDIN->autoflush(1); STDOUT->autoflush(1);
|
|---|