[EMAIL PROTECTED] wrote: > I'm trying to put the string from the system("ls -al") into a variable. It > simply prints to the page and puts 1 in the variable. > > I wan't to use this variable to determine the permissions for the files on a > linux machine. Is there an easier way?
Hi Tricia. There's nothing new herem just boiling down the answers that others have posted: - system() returns the exit status code of the external program it ran, not the output. A value of 1 generally indicates success. - to get the output of an external program, use backticks: `ls -al` rather than system(). - get into the habit of doing things within Perl if you can. This increases the chances of your program working on another system. opendir/readdir/closedir calls will let you build a directory - use stat() to get extended information about an existing file ( lstat() will do the same for a link ) HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]