in reply to hostname to IP

It works for me. What do you mean by "doesn't work"?

Also note that the DATA section contained machine names, while your input file contains IP addresses, which is the expeted output.

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ