I don't see where you set any value to $NIC. How and where do you determine what value to assign to $NIC?

In KiX, == forces a case sensitive =.

ELSE is not needed if there is no ELSE condition.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.