use strict;
use warnings;
use IO::Socket;
my $sock = new IO::Socket::INET(
PeerAddr=> 'localhost',
PeerPort=> '7070',
Proto => 'tcp');
die "Could not create socket: $!\n" unless $sock;
my $run = "yes";
while($run eq "yes")
{
my $text = <STDIN>;
print $sock "$text";
print "Send more strings? yes/no";
$run = <STDIN>;
}
close($sock);
i have an while loop so that the script keeps running and you can enter text again for sending but i wont work why?