use POSIX ":sys_wait_h"; while ( kill(0, $pid) ) { my $addr = recv( $socket, my $time, 1024, 0 ) or select '','','',0.015; printf "\rProgress: %s", $time; my $res = waitpid($pid, WNOHANG); } #### This is perl 5, version 20, subversion 1 (v5.20.1) built for MSWin32-x86-multi-thread-64int (with 1 registered patch, see perl -V for more detail) Copyright 1987-2014, Larry Wall Binary build 2000 [298557] provided by ActiveState http://www.ActiveState.com Built Oct 15 2014 22:10:49