in reply to Problem Scan UDP Port

I've followed your wild goose chase of pastebin links, and my suggestion to you is to first clean up your code and separate all the things your code attempts.

Your code tries to do forking, and tries to do asynchronous socket handling, and tries to do an UDP socket scan.

Start simple and write a program that only does synchronous UDP socket handling for a single port and make that work.

Then, decide on whether to use fork() or asynchronous socket handling.

Then, implement one of the choices but don't mix them.

Also, you may want to investigate AnyEvent for asynchronous socket handling.