#!/usr/bin/perl -w #run_system_cmd.pl use strict; use Data::Dumper; my $debug =1; undef my @array; @array = `./tst_ssh_host_key.pl`; print Dumper @array; print "\n"; ---- workaround Run Output: ./run_system_cmd.pl $VAR1 = 'open_ssh,172.23.5.13,user,password '; $VAR2 = 'Before ssh->login '; $VAR3 = 'FIX: .ssh/known_hosts '; $VAR4 = 'After ssh->login '; $VAR5 = 'login_output= '; $VAR6 = 'global=SSHProcessError The ssh process was terminated. at ./tst_ssh_host_key.pl line 42 '; $VAR7 = ' '; $VAR8 = 'ssh=FAILED,no_login_output,end_login '; $VAR9 = 'DONE ';