Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^3: formatting output from system call

by vinoth.ree (Monsignor)
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.

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

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1078727]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2018-02-21 02:13 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (274 votes). Check out past polls.