I ran your code with no problems. What are the errors you seeing? Is it something like:

synsun1000 Can't open synsun1000: Invalid argument at D:\Sysad-perl\perltest\test +1.pl line 13. Can't call method "login" on an undefined value at D:\Sysad-perl\perlt +est\test1. pl line 14.

If that is similar to what you are getting then the problem is that your second system is not available or does not exist.

If not, you might consider puting an availability check if your systems are not always up.

update

Another passing thought from looking at your code. I see "ntsrv" if they are nt servers, they have to have the FTP deamon running. So best bet is to show the error you are getting.


In reply to Re: Problems with Loop by Marza
in thread Problems with Loop by lanier

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.