Sep 26, 2005, 2:19 AM
Post #4 of 5
You use the qx() operator to execute an external command an capture the output.
Re: [jay] Help from an Expert on simple code
[In reply to]
my @cpuinfo = qw(grep processor /proc/cpuinfo);
You'll often see that written using backticks instead - that's just another version of the same thing.
my @cpuinfo = `grep processor /proc/cpuinfo`;
p.s. This really isn't "advanced", so I've moved the thread into the beginners' forum and removed the copy that you had already put there. Please don't ask the same question in multiple forums.
Dave Cross, Perl Hacker, Trainer and Writer
Get more help at Perl Monks
(This post was edited by davorg on Sep 26, 2005, 3:24 AM)