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

The output looks like this: USB::0x0699::0x0368::C010731::INSTR <- MEASU:IMMED:VALUE? USB::0x0699::0x0368::C010731::INSTR -> 9.9E37 I would want to pull the 9.9E37 out of that. The regex part should be easy, but I'm not quite sure how that would work with qx().
  • Comment on Re^2: formatting output from system call

Replies are listed 'Best First'.
Re^3: formatting output from system call
by vinoth.ree (Monsignor) on Mar 18, 2014 at 05:06 UTC

    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
      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.