Many different ways to do it. But if you want to leave your variables the same, something like this might work:

Code:

for each $printer in split($printers, ",")
$ = execute('$$curPrinter = "$" + $printer')
? $curPrinter
if instr($curPrinter, @userid)
? "user gets this printer"
endif
next

_________________________
Eric