in reply to Re: Algorithm needed
in thread Algorithm needed

Using merlyn's code (see this node):
use strict; my %hash; while (<DATA>) { # split based on spaces my ($hex, $foo, $int) = split /\s+/; $hash{$hex}{$int}++; } for (keys %hash) { print "$_ = ", join(", ", sort keys %{$hash{$_}}), "\n"; } __DATA__ 0x130005d 1.253.54.1 11 0x130009c 1.253.54.2 12 0x130005d 1.253.54.1 14 0x130005d 1.253.54.1 11 0x130005d 1.253.54.1 10 0x130009c 1.253.54.2 12 0x130009c 1.253.54.2 14
Gives
0x130005d = 10, 11, 14 0x130009c = 12, 14


--
"I don't intend for this to take on a political tone. I'm just here for the drugs." --Nancy Reagan