Chat server: Difference between revisions
Content deleted Content added
Added Perl example |
m →{{header|Perl}}: minor fixes |
||
Line 1,501:
my ($id, $message) = @_;
print "$message\n";
foreach my $i (
if ($i != $id) {
$open[$i]->send("$message\n");
Line 1,559:
}
my $conn = $open[$i];
Line 1,582:
else {
broadcast($i, "--- $users{$i} leaves ---");
undef $open[$i];
}
}
|