I changed the protocol to UDP in the broadcast program and it ran and didn't give me an error or anything. But then when I changed the protocol on the listener to UDP, it kept crashing. I removed the "Listen => 1" and it would run but do nothing.
Here's the code for the listener:
my $sock = new IO::Socket::INET (
LocalHost => '172.16.7.101',
LocalPort => '7070',
Proto => 'udp',
# Listen => 1,
Reuse => 1, 8 );
die "Could not create socket: $!\n" unless $sock;
my $new_sock = $sock->accept();
Okay, I did more searching and found examples that did not specify the local IP address for the socket using UDP. I removed "LocalHost => '172.16.7.101'" and now it's working fine. I've even tested it with several boxes listening and they all got the same message, so I know it's actually broadcasting.