Still, I don't see where you assign any value to $NIC! You should not rely on blind faith that $NIC will somehow magically have a suitable value.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.