I am trying this and it works fine for me, perl version 5.005_03. Is B up to anything else that makes it hang ? Can you run the test code below (with the right path to B) on your system ?
#!/usr/local/bin/perl -w
#### A ####
use IPC::Open2;
open2( \*READ, \*WRITE, '/home/random/B' );
print WRITE "Hello there.\n";
my $in=<READ>;
print "$0 read: $in\n"
#!/usr/local/bin/perl -w
#### B ####
$input = <STDIN>;
print "echo back: $input";
Regards,
R.
update
I think the following reply has the answer, set autoflush with $|=1 in B or A may hang while the data from B is hanging around in buffer.