use strict; use warnings; $SIG{CHLD} = "IGNORE"; my $pid = fork(); die "can not fork" if !defined $pid; if ($pid == 0) { # in child process my $cmd = "/usr/openwin/bin/xterm -display "; my $ssh = Net::SSH::Perl->new(, port => 22); my $ssh->login(, ) my($out, $err) = $ssh->cmd($cmd); exit(0); } # in parent process # carry on doing other things...