The read command does not receive the data from a pipe, e.g.
ksh-\1> echo "test" | read x
ksh-\2> echo $x
ksh-\3> read x
ksh-\4> echo $x
As you see in the second attempt without the pipe, read gets
the input string and assigns to variable x. Both will work
on HP-UX and on SunOS.
This happens with bash too, FWIW.
It works with zsh - the author of pdksh is aware of the problem:
The author is of the opinion that this is undefined behaviour in the POSIX spec.
*** Bug 20097 has been marked as a duplicate of this bug. ***
*** Bug 3200 has been marked as a duplicate of this bug. ***
*** Bug 42720 has been marked as a duplicate of this bug. ***