laziness, impatience, and hubris | |
PerlMonks |
Re: help! Please please help!by amarquis (Curate) |
on Mar 14, 2008 at 12:47 UTC ( [id://674193]=note: print w/replies, xml ) | Need Help?? |
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:
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 Section
Seekers of Perl Wisdom
|
|