in reply to Capture output from system commands

Try $text->insert('1.0', qx[$got]).

Replies are listed 'Best First'.
Re: Re: Reading from the screen
by Anonymous Monk on Nov 18, 2003 at 02:42 UTC
    thanks, it worked, but could you explain how qx does it?
      The 'qx' keyword is just another way to write the back quote (`). The code -
      $n = qx/ $got /;
      is equivalent to
      $n = `$got`;
      What it does is to execute the $got command, and capture its output to a scalar.

      You should have a look on CPAN perlop under the section "Quote and Quote-like Operators".

      Update: Thanks to ysth to point out my typo.