in reply to Data::Dumper is returning empty

As likely steps, I would verify that $platform_in contains what you think it should. It looks as if you never modify %nic which is why Data::Dumper shows it as empty. Note also how none of your print statements appear in the output.

This leads me back to some old IBM research I remember that every if statement needs an else branch, as I remember them finding a high likelyhood that an if without the corresponding else was an error. In your case, you should add a final else branch to your chain of if statements that check the operating systems, and in that else branch either die or at least output something that you don't know what to do with $platform_in.