in reply to communication between programs

I think your problem is that instead of

my $rh_set = IO::Select->select($read_set, undef, undef, 0); foreach my $rh (@$rh_set) {
you want
my($rh_set) = IO::Select->select($read_set, undef, undef, 0); foreach my $rh (@$rh_set) {
or
my @rh_set = $read_set->can_read(); foreach my $rh (@rh_set) {

The original code can't work, because it's not defined what the IO::Select->select method returns in scalar context (you're calling it like that), and in list context it returns a list of three references to arrays, the first being a reference to the array of readable handles.