I don't think that the GuiTest will help me here. Basically I have a function that calls a getch that uninitiates the current process. That's what I am trying to achieve in perl ( simulate the keystroke ). When running the script in Windows it all goes well. I assume that when running it using ssh from ,let's say, ubuntu it fails to simulate the keystroke because ssh is not interactive.
my $pid = open (PROCESS, " | $process_that_needs_ending > $output_filename) or die "message";
system(some_process_done_in_parralel); -> this spawned process needs to happen in the lifetime of PROCESS and afterwards it needs killing by keystroke