I've seen some very nice perl scripts that do in 5 lines what it takes 100 lines of java to do. But for me, it just isn't documented as well as java. If you are open to doing it java, it is very easy to fire off a udp packet.
DatagramSocket ds = new DatagramSocket(<srcPort> , <srcIPAddress>);
DatagramPacket packet = new DatagramPacket(<payload as byte> , <payload length> , <dstIPAddress>, <dstPort>);