On Tue, Jul 12, 2005 at 12:11:33PM +0100, Andrew Benham wrote: > Perl 5.8.6 > > File /usr/lib/perl5/5.8.6/i386-linux-thread-multi/IO/Socket.pm on > Fedora Core 4. > > Line 407 (which is part of the POD) states: > > $sock->read(1024,$data) until $sock->atmark; > > I don't believe the arguments to the read() method are in the > correct order.
You're right, they're not. --- lib/IO/Socket.pm 2005/07/12 20:18:07 1.1 +++ lib/IO/Socket.pm 2005/07/12 20:18:12 @@ -404,7 +404,7 @@ use IO::Socket; my $sock = IO::Socket::INET->new('some_server'); - $sock->read(1024,$data) until $sock->atmark; + $sock->read($data, 1024) until $sock->atmark; Note: this is a reasonably new addition to the family of socket functions, so all systems may not support this yet. If it is -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern You are wicked and wrong to have broken inside and peeked at the implementation and then relied upon it. -- tchrist in <[EMAIL PROTECTED]>