jeanluca has asked for the wisdom of the Perl Monks concerning the following question:
So, its the open call that doesn't do what I would like to have.my $sock = new IO::Socket::INET ( ... ) my $ns = $sock->accept() ; { local *STDOUT ; open STDOUT, '>', $ns or die "Nope: $!\n"; print "thnx for usign me\n\n" ; # send message to client #print $ns "thnx for usign me\n\n" ; # this works } close($sock);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: howto redirect STDOUT to $socket
by monarch (Priest) on Sep 06, 2007 at 07:52 UTC | |
|
Re: howto redirect STDOUT to $socket
by salva (Canon) on Sep 06, 2007 at 08:22 UTC | |
|
Re: howto redirect STDOUT to $socket (local*)
by tye (Sage) on Sep 06, 2007 at 13:14 UTC | |
| |
|
Re: howto redirect STDOUT to $socket
by Anonymous Monk on Sep 06, 2007 at 08:01 UTC |