open(FILE,"ntuser -s cphtount001 show * |"); while() { open(FILE1,"ntuser -s cphtount001 show $_|"); while() { $NAME=$_ if /NAME/; print "$NAME $_" if /permission to dial/; } close(FILE1); } close(FILE);