[Chicago-talk] strange sockaddr_in error

Richard Reina richard at rushlogistics.com
Mon Jul 25 09:48:32 PDT 2005


Good Morning All,

When I try the following:

use Socket;
socket(SOCKET, PF_INET, SOCK_DGRAM,
getprotobyname("udp"))) or die "socket: $!";

my $portno = 5151;
my $packed_ip = inet_aton("192.168.0.2");
my $portaddr = sockaddr_in($portno, $packed_ip);

I get:

Bad arg length for Socket::pack_sockaddr_in, lenght 0,
should be 4 at
/usr/lib/perl5/5.8.3/i386-linux-thread-multi/Socket.pm
line 373.

Does anyone know whatI am doing wrong?

Thanks,

Richard

A people that values its privileges above its principles soon loses both.
 -Dwight D. Eisenhower.


More information about the Chicago-talk mailing list