open (FIND_OUTPUT , "$CT find . -version'brtype($branch)' -print -all |"); # I only tried to flush the buffer because it's hanging # But still doesn't work select((select(FIND_OUTPUT), $|=1)[0]); while ($line = ) { ($filename = $line) =~ s/(.*)@@.*/\1/; ($version = $line)=~ s/(.*)@@(.*)/\2/; #... do a bunch of line processing and put line in hash $ccase_filehash{$filename} .= ";" . $version; } close FIND_OUTPUT; foreach $key (keys %ccase_filehash) { print "$key: $ccase_filehash{$key} \n"; } #### system ("$CT find $vob -version 'brtype($branch)' -print $all > /tmp/find.out"); open (FIND_OUTPUT , "/tmp/find.out"); # This doesn't help but I put it in anyway select((select(FIND_OUTPUT), $|=1)[0]); while ($line = ) { ($filename = $line) =~ s/(.*)@@.*/\1/; ($version = $line)=~ s/(.*)@@(.*)/\2/; #... do a bunch of line processing and put line in hash $ccase_filehash{$filename} .= ";" . $version; } foreach $key (keys %ccase_filehash) { print "$key: $ccase_filehash{$key} \n"; }