in reply to Top n Unique count from Array

I want to acheive similar output but from array.
But the first thing your initial program does when reading in a line is to turn it into an array!
if (my ($src) =/\bsrc=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/){push @srcs, $src;}
So, your question is, I replaced @logs = split (/ /,$fields); with a similar line that uses @srcs instead of @logs, how do I continue?. Maybe the easiest is to add @logs = @srcs;?