[wplug] Perl System Funcion
terry mcintyre
terrymcintyre at yahoo.com
Tue Sep 4 12:00:33 EDT 2007
Matthew T. Engel wrote:
> Something like System(“cd /home/$user/$web_root && ls), does an ls on
> /home/$user rather than /home/$user/$web_root. The system() function
> returns 0, I get the same thing if I try system(cd /home/$user && cd
> $web_root && ls).
Test script:
$user="terry";
$web_root="Desktop";
$result = system("cd /home/$user/$web_root && ls");
print "$result";
... worked as expected; it listed the contents of /home/terry/Desktop
Terry McIntyre <terrymcintyre at yahoo.com>
They mean to govern well; but they mean to govern. They promise to be kind masters; but they mean to be masters. -- Daniel Webster
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.wplug.org/pipermail/wplug/attachments/20070904/57ab23d0/attachment.html
More information about the wplug
mailing list