title: UDP discover broadcast and listen - not working for me
body: <p>I have a simple device on my network that responds to udp broadcasts of a certain message.  It responds to the sender with location information.  I can send the broadcast and see the proper response coming in on Wireshark, but my perl code doesn't show the response.  I know this must be simple, but I cannot see it...</p>
  <hr />
  <pre><code>#!/usr/bin/perl
  use warnings;
  use IO::Socket::INET;
  
  print &quot;\n&gt;&gt; Discovery Program &lt;&lt;\n&quot;;
  #--
  #-- find.pl
  #--
  
  # Create a sending socket
  my $sock = IO::Socket::INET-&gt;new(
                         PeerPort  =&gt; 55555,
                         PeerAddr  =&gt; inet_ntoa(INADDR_BROADCAST),
                         Proto     =&gt; 'udp',
                         LocalPort =&gt; 0,
                         Broadcast =&gt; 1)
                     or die &quot;Can't bind : $@\n&quot;;
  
  # Send message
  my $msg = &quot;XYZ&quot;;
  chomp $msg;
  $sock-&gt;send($msg);
  
  # Receive message
  my $text;
  $sock-&gt;recv($text,128);
  print &quot;\nReceived message '&quot;, $text,&quot;'\n&quot;;
  </code></pre>
  <hr />