in reply to Regexp question,get 2nd match
If (\d+\.\d+\.\d+\.\d+\:\d+) matches one ip-address, then (\d+\.\d+\.\d+\.\d+\:\d+)(\d+\.\d+\.\d+\.\d+\:\d+) will match two(*). The only thing you have to consider that there are some other characters in between. You may get them with .*?. So your final code could be:
HTH, Rataif (m/(\d+\.\d+\.\d+\.\d+\:\d+).*?(\d+\.\d+\.\d+\.\d+\:\d+)/){ push @ipaddress,$2;
update: (*) well, not exactly, as there is a seperator missing between both (and the regex-engine cannot determine where ip1 ends and where ip2 starts) ... but that is taken care off in the next step...
In Section
Seekers of Perl Wisdom