/usr/share/doc/libio-socket-multicast6-perl/examples/multicast-recieve.pl is in libio-socket-multicast6-perl 0.03-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #!/usr/bin/perl
use strict;
use lib '../blib/lib','../blib/arch';
use IO::Socket::Multicast6;
#use constant GROUP => 'ff15::9023';
use constant GROUP => '239.255.30.29';
use constant PORT => '2000';
my $sock = new IO::Socket::Multicast6(
LocalAddr=>GROUP,
LocalPort=>PORT,
ReuseAddr=>1)
|| die "Failed to create multicast socket: $!";
$sock->mcast_add(GROUP) || die "Couldn't join group: $!\n";
while (1) {
my $data;
next unless $sock->recv($data,1024);
print "$data\n";
}
|