in reply to how can I set LocalAddr to INADDR_ANY in IO::Socket::INET

'0.0.0.0' is the same as INADDR_ANY (once packed), so you're telling the system to let it pick the interface. That's the default behaviour, so that's why LocalHost => '0.0.0.0', has no effect.

I don't know how you can work around that, but I suspect you'll have to work at a much lower level. Raw packet?

By the way, it makes no sense to specify LocalAddr and LocalPort, since LocalAddr is a shortcut for LocalHost and LocalPort.