open my $pipe, '-|', "$program 2>&1" or die "Error opening pipe: $!\n"