in reply to Host address not getting
where that little bit of code can be written a lot of different ways.my @address = @ARGV; my @url; for my $i (0 .. @address-1) { $url[$i] = "http://$address[$i]:8161/admi/xml/queues.jsp"; }
A review of For Loops and Foreach Loops in perlsyn might be helpful.my @address = @ARGV; my @url = map "http://$_:8161/admi/xml/queues.jsp", @address;
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Host address not getting
by cesargarza (Initiate) on Sep 26, 2013 at 20:56 UTC | |
by kennethk (Abbot) on Sep 26, 2013 at 21:23 UTC | |
by Marshall (Canon) on Sep 27, 2013 at 03:54 UTC |