my @files = qx{ls -al};
print $_ foreach (@files);
Steve
[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object:erlDesignPatterns)[/small]
Sorry. My server (the machine that will be using this) is a while away, and is hard to get to. It is also broken, so I can't try it. Thanks for all your help!
Yes. The 'lines' of output that are usually printed by the unix command will end up as elements in the array lvalue. Typically you'd use this for query-type commands, where you want to get the output into variables in your program.
Steve
[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object:erlDesignPatterns)[/small]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.