in reply to Re^2: perl, open and pipe
in thread perl, open and pipe

Since in the OP 'twas said
I want to catch that error (or any result from the /usr/bin/js program).

a single stream fits the task. Managing two file descriptors would be a YAGNI in that case.