in reply to Counting unique instances from Array Sort

The answer is given more than once here. But again:
my %ip_count; ++$ip_count{$_} for (@ipAddresses);

s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

Replies are listed 'Best First'.
Re^2: Counting unique instances from Array Sort
by ewhitt (Scribe) on Jan 07, 2008 at 09:53 UTC
    I am not sure if I follow. What I am trying to do is take:
    my @ipAddresses = ("172.16.16.1 ", "172.16.16.1 ", "172.16.16.1 ", "17 +2.16.16.2 ");
    and be able to print something like this while / after the sort:
    172.16.16.1,3 172.16.16.2,1
    Thanks!