for my $key (keys %logins) { my $response = get("http://www.dtdns.net/autodns.cfm?id=$key&pw=$logins{$key}&ip=$ip"); print "$key: [$response]\n"; } #### key1: [ The Response from key1] key2: [ The Response from key2] #### for my $key (keys %logins) { my $response = get("http://www.dtdns.net/autodns.cfm?id=$key&pw=$logins{$key}&ip=$ip"); $response =~ s/\n//g; print "$key: [$response]\n"; } #### The Response from key1] The Response from key2]