M
Matija Papec
I need to group hashrefs into branches where every instance in branch has
something in common with others. The problem is that no one can tell which
attribute will be dominant, so I guess there should be some counting before
actual grouping into branches. Please tell me that somebody already has
invented the wheel.
my @rules = (
{
'source-port' => 23,
protocol => "tcp",
},
{
source => '6.11.6.6/24',
},
{
protocol => 'udp', 'source-port' => 53,
source => '64.11.6.6',
},
{
protocol => 'udp', 'source-port' => 53,
source => '164.11.6.6',
},
{
protocol => 'udp', 'source-port' => 53,
source => '164.11.6.7',
},
{
protocol => 'udp', 'source-port' => 53,
source => '164.11.6.8',
},
);
something in common with others. The problem is that no one can tell which
attribute will be dominant, so I guess there should be some counting before
actual grouping into branches. Please tell me that somebody already has
invented the wheel.
my @rules = (
{
'source-port' => 23,
protocol => "tcp",
},
{
source => '6.11.6.6/24',
},
{
protocol => 'udp', 'source-port' => 53,
source => '64.11.6.6',
},
{
protocol => 'udp', 'source-port' => 53,
source => '164.11.6.6',
},
{
protocol => 'udp', 'source-port' => 53,
source => '164.11.6.7',
},
{
protocol => 'udp', 'source-port' => 53,
source => '164.11.6.8',
},
);