I think you might want to look into using arrays. Then you could do something like...

Code:

for each $printer in $printerArray
if instr($printer,$NetID) and not $printerFound
$printerFound = 1
endif
next