in reply to using pipes in a system() call

Your command has a syntax error. You are missing a semicolon. It is also possible that $UID is not defined when you try to use it.

... -print \; | ...

The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon