
davorg
Thaumaturge
/ Moderator
Sep 26, 2005, 2:19 AM
Post #4 of 5
(778 views)
|
|
Re: [jay] Help from an Expert on simple code
[In reply to]
|
Can't Post
|
|
You use the qx() operator to execute an external command an capture the output.
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 http://www.dave.org.uk/ Get more help at Perl Monks
(This post was edited by davorg on Sep 26, 2005, 3:24 AM)
|