in reply to using pipes in a system() call

A good debugging technique for problems like this is to build the command in a scalar and then pass that to system. This way you can examine what's actually getting passed to the shell (either in the debugger or by adding something like print "## \$cmd: ", $cmd, "\n" to your code). It may be the case that one or more of the variables you're trying to interpolate don't contain what you think they do (e.g. $home[$i] might be empty or doesn't end in a "/").