#!/usr/bin/perl use strict; use IO::Socket; my $sock = new IO::Socket::INET ( PeerAddr => '10.2.7.193', PeerPort => '7788', Proto => 'tcp', ); die "Could not create socket :-( $!\n" unless $sock; print $sock "hello world!"; close($sock); #### #!/usr/bin/perl -w use strict; use IO::Socket; my $sock = new IO::Socket::INET ( LocalHost => '10.2.7.193', LocalPort => '7788', Proto => 'tcp', Listen => 2, Reuse => 1, ); die "Could not create socket: $!\n" unless $sock; my $new_sock = $sock->accept(); while(defined(<$new_sock>)) { my $storage = $_; print $storage; } close($sock); #### Use of uninitialized value in print at ./socket_serv line 17, line 1.