In addition to what Corion said, you don't need to use qw, but it can save you some work and help you format your source better.

Basically:

my @servers = ('213.123.20.134','213.123.20.119','213.123.20.120','213.123.20.121','213.123.20.122','213.123.20.123', '213.123.20.124','213.123.20.125','213.123.20.126','213.123.20.127','213.123.20.128','213.123.20.129', '213.123.20.130','213.123.20.131','213.123.20.132');

... can turn into:

my @servers = qw( 213.123.20.134 213.123.20.119 213.123.20.120 213.123.20.121 #etc etc. );

Basically, it will split on (I believe) whitespace* and treat anything between as quoted, so you get rid of quotes and commas. It lets you have more freedom in arranging a long list.

Also, you might get better results posting here if you add <code;> tags around your code and write a title that summarizes your issue. It helps people get a handle on your problem quickly, which makes them more likely to help you out.

* - Just checked perldoc, "Evaluates to a list of the words extracted out of STRING, using embedded whitespace as the word delimiters."


In reply to Re: help! Please please help! by amarquis
in thread help! Please please help! by weezer316

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.