I'm working on a script for the VoIP software, Freeswitch. The script will run as an instance listening for inbound messages to a socket.
I used an example script provided with Freeswitch, to start with, and everything works fine.
However, one bit is throwing me off.
use IO::Socket::INET;
use warnings;
use strict;
my $sock = new IO::Socket::INET ( LocalHost => '127.0.0.1', LocalPort => '8060', Proto => 'tcp', Listen => 1, Reuse => 1 );
die "Could not create socket: $!\n" unless $sock;
for(;;) {
my $new_sock = $sock->accept();
my $pid = fork();
if ($pid) {
close($new_sock);
next;
}
close($new_sock);
}
What exactly does the ;;
mean? Is it a special operator that is defined when a socket is created? Struggling to find documentation!