Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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

Comment on Re^3: formatting output from system call
Download Code
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (10)
As of 2016-02-10 16:30 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (352 votes), past polls