in reply to using pipes in a system() call
Why don't you add a line before your system call...
Edit: Fletch's response to this node points out the dangerous situation that my suggestion can lead to. I'm leaving it in place as it's a valuable lesson to be learned.
Now you can see what it's expanding into with the variable interpolation. I'm guessing the variables aren't expanding into what you think they are.print "find $home[$i]$dir -user $UID -print | xargs -n 1 chown -h $NEW +UID\n"; system("find $home[$i]$dir -user $UID -print | xargs -n 1 chown -h $NE +WUID");
Edit: Fletch's response to this node points out the dangerous situation that my suggestion can lead to. I'm leaving it in place as it's a valuable lesson to be learned.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: using pipes in a system() call
by Fletch (Bishop) on Dec 07, 2005 at 19:26 UTC | |
by swkronenfeld (Hermit) on Dec 07, 2005 at 19:41 UTC | |
by Fletch (Bishop) on Dec 07, 2005 at 19:50 UTC |
In Section
Seekers of Perl Wisdom