##
pipe (IN,OUT);
my $pid = fork ();
die("fork failed") if (!defined($pid));
if ($pid == 0 ) {
#the child
exec ('programname -help');
}
else {
#parent
sleep (2);
#printing the newline character in the child process
print OUT "\n";
waitpid ($pid,0);
}
####
sub print_it {print "\n"};
my $SIG{INT}=\&print_it;
....
else {
#parent
sleep (2);
kill INT=>$pid;
waitpid ($pid,0);
}