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

In reply to Re^4: Using Variable outside of loop with Net::SSH by Nich240
in thread Using Variable outside of loop with Net::SSH by Nich240

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.