if ($input[0] eq "ssh"){ # SSH session my $exp = new Expect; $exp->raw_pty(1); $exp = Expect->spawn("$cmd\r"); $exp->expect(1, '-ex', "$_"); system("stty -echo"); $exp->expect (1, '-ex', "$_"); $password = ; system("stty echo"); chomp $password; $exp->send ("$password\r"); $exp->expect (1, '-ex', "$login[1]:~#"); my $input = ; chomp $input; if ($input =~ "@@"){ $input =~ s/@@//; my $script = "/root/Desktop/$input"; open(SCRIPT, "./$input|"); while (