Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: formatting output from system call

by vinoth.ree (Parson)
on Mar 18, 2014 at 05:06 UTC ( #1078727=note: print w/ replies, xml ) Need Help??


in reply to Re^2: formatting output from system call
in thread formatting output from system call

We suggested to use qx() to execute the command and capture the output, into a variable like below, instead of creating file.

Ex:
use strict; use warnings; my $output = qx(date); print $output;

After that you can use your regx on that variable and pull the output value.


All is well


Comment on Re^3: formatting output from system call
Download Code
Re^4: formatting output from system call
by mark4444az (Sexton) on Mar 19, 2014 at 15:12 UTC
    That is the more sensible way to do this, I will research the qx command and apply it to my script. Thankyou for your help.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1078727]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2014-09-02 02:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (18 votes), past polls