in reply to Building a UDP Ethernet header

What is the purpose here? You can easily send UDP packets in Perl without having to craft them from raw sockets. If you have an actual use case for crafting UDP (or any packets for that matter), see Net::Frame suite. Otherwise, something like UDP Listener / Server should do the trick.