Thanks for sharing your solution with us. It does appear to be a rather 'roundabout way.
in reply to Re^13: IO::Socket Listen
in thread IO::Socket Listen
I would have hoped that your experiment results would have shown us where the timing problem was:
-t0: send ping to google, wireshark timing
-t1: receive ping from google, wireshark timing
-t2: send packet to device, wireshark timing
-t3: receive packet from device, wireshark timing
-t4: Perl code does something (probably send out a ping so that
we get a time stamp with wireshark).
t2-t1 is the time for Perl to send the packet
t3-t2 is the time for the device to respond
t4-t3 is the time for Perl to do something
However, I am glad that you got a solution!
Perl is like the "Swiss army knife of the internet".