Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > grouping hashrefs to trees

Reply
Thread Tools

grouping hashrefs to trees

 
 
Matija Papec
Guest
Posts: n/a
 
      11-16-2003

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',
},
);


--
Matija
 
Reply With Quote
 
 
 
 
Ben Morrow
Guest
Posts: n/a
 
      11-16-2003

Matija Papec <(E-Mail Removed)> wrote:
> 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.


You may find Data::Favorites helpful.

Ben

--
For the last month, a large number of PSNs in the Arpa[Inter-]net have been
reporting symptoms of congestion ... These reports have been accompanied by an
increasing number of user complaints ... As of June,... the Arpanet contained
47 nodes and 63 links. [ftp://rtfm.mit.edu/pub/arpaprob.txt] * http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Binary search trees (AVL trees) jacob navia C Programming 34 01-08-2010 07:27 PM
sorting an array of hashrefs John W. Krahn Perl Misc 1 08-29-2006 08:29 PM
iterating over a hashref of hashrefs Sam Perl Misc 6 06-15-2005 10:44 AM
Trees in java Pif Java 1 04-06-2004 11:48 AM
array of hashrefs (nested) monkeys paw Perl Misc 9 10-28-2003 01:55 AM



Advertisments