title: How to Collect "iperf" output in Perl
body: <p>I'm running <code>iperf</code> between two linux (centos) machines in Perl. The server side generates the output shown down the bottom. I need to collect the test duration (0.4 sec in this case) and put it in a variable. It shouldn't be hard but I'm having a hard time since I'm a perl newbie.</p>
  
  <pre class="lang-none prettyprint-override"><code>Server listening on TCP port 5001
  TCP window size: 85.3 KByte (default)
  [  4] local 192.168.18.2 port 5001 connected with 192.168.17.2 port 32840
  [  4]  0.0- 0.4 sec  10240 KBytes  210890 Kbits/sec
  </code></pre>