in reply to interprocess communication
Your parent-process uses the angle-operator to read from the pipe which means it looks for newlines. Your child however does not supply newlines.
So try
print WRITE "$val2\n"; [download]