in reply to Re^3: Using Variable outside of loop with Net::SSH
in thread Using Variable outside of loop with Net::SSH

Thanks Aaron: The problem is solved.

In order to provide output to you, I changed the nas command that I was running. The original command had a lot of output, so I changed the command. Inside Loop and Outside Loop was exact. This is what I wanted, and exactly what you said. I changed back to the original nas command, and my Inside Loop was correct, but Outside Loop was empty.

Apparently it may have something to do with the output of the command. I ran it again, with an output of 3 lines, and here is my result. Only the last line is passed down. My last line in the initial command was probably empty.
Inside: 10 - slot_0 primary control station
Inside: 5 - slot_2 contacted
Inside: 5 - slot_3 contacted
Outside: 5 - slot_3 contacted
  • Comment on Re^4: Using Variable outside of loop with Net::SSH