my @data; while ($running) { my $nfound = select $rfds, $wfds, $efds, 0; ... @data = split /\n/, $rawdata; }