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"; }