Radimus,
Not sure whether you caught my subtle hint, but your routine to strip off the pipe char, will strip the last char regardless of whether it is pipe or not. Perhaps an IF condition to remove the pipe only idf it exists.

if substr($subnetm[$nic],len($subnetm[$nic]),1)="|" $subnetm[$nic]=left($subnetm[$nic],len($subnetm[$nic])-1) endif

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.