in reply to IO::Socket and variables

print { $socket[$counter] } "foo\n"

or

$socket[$counter]->print("foo\n")

or even

$sock = $socket[$counter]; print $sock "foo\n"

Replies are listed 'Best First'.
Re: Re: IO::Socket and variables
by arturo (Vicar) on May 22, 2001 at 02:27 UTC
    Or
    sub socket_print { my ($socket, $message) = @_; print $socket $message; }