Based on your description the program you're using (IC4.pl) is either displaying directly to the terminal, or expecting input from the terminal, instead of the normal STDOUT and STDIN. The typical solution to dealing with interactive programs like this is to use
Expect.