print ("login : @switch_details[4] \n"); print ("password : @switch_details[3]\n"); my $ssh = Net::SSH::Expect->new ( host => @switch_details[1], password=> @switch_details[3], user => @switch_details[4], raw_pty => 1 ); my $login_output = $ssh->login();