in reply to perl hangs on write syscall

Define huge.

In any case, what's probably happening is that whatever is attached to the other side of file descriptor 4 (a pipe?) is not handling the data.