in reply to looping an array through perldap

foreach (@hosts){ my ($host,$port)=split /:/; etc.. }
See split for more info.