How do I launch a command on an existing terminal in unix using PERL

Hello,

I have a PERL-TK based GUI from which I want to launch a command on an existing UNIX terminal (this is also the parent terminal for this perl based gui window). The command I want to launch is interactive (there is no intention to interact with that command from the same PERL gui i.e. no further interaction between the two processes).
I tried the following:
Option1: system("$command");
This launched the command on the parent terminal but the $command got suspended in-between because it is interactive.

Option2: system("gnome-terminal -x sh -c $command");
This launched the command in interactive mode on a "new" terminal. The problem in this case is that the terminal gets killed once the command execution completes.

Thanks in advance!

Regards,
Anurag

Have you investigated "screen" ?

"screen $command" also exists automatically after the execution of $command. Whereas we want to have the new terminal running after execution of $command. Any idea ? :frowning: