in reply to Re: How to capture and verify STDOUT of a Perl Module
in thread How to capture and verify STDOUT of a Perl Module

I tried Test::Output. It looks like it did not capture the output from a system() that Module issues.
  • Comment on Re^2: How to capture and verify STDOUT of a Perl Module

Replies are listed 'Best First'.
Re^3: How to capture and verify STDOUT of a Perl Module
by toolic (Bishop) on Jul 29, 2013 at 18:51 UTC
    it did not capture the output from a system()
    system does not return a command's output (only its exit status). Perhaps you want qx.
      I know, but if system() runs something that produces output, I want it captured and can't:
      system("/bin/echo HELLO");
        Why not:
        my $capture = qx{echo HELLO};

        I know, but if system() runs something that produces output, I want it captured and can't:
        Not so!!. Because system is not what you want to use to capture the output from a command use backticks or qx has it has been shown by others.
        Then you can test your output if you want.

        If you tell me, I'll forget.
        If you show me, I'll remember.
        if you involve me, I'll understand.
        --- Author unknown to me