Gossamer Forum
Home : General : Perl Programming :

How can I parse a tab separated data file and group the extracted data in Perl

Quote Reply
How can I parse a tab separated data file and group the extracted data in Perl
I am newbie to Perl. I need to parse a tab separated text file. For example:

From name To name Timestamp I nteraction
a b Dec 2 06:40:23 IST 2000 comment
c d Dec 1 10:40:23 IST 2001 like
e a Dec 1 16:03:01 IST 2000 follow
b c Dec 2 07:50:29 IST 2002 share
a c Dec 2 08:50:29 IST 2001 comment
c a Dec 11 12:40:23 IST 2008 like
e c Dec 2 07:50:29 IST 2000 like
c b Dec 11 12:40:23 IST 2008 follow
b a Dec 2 08:50:29 IST 2001 share

After parsing I need to create groups base upon users interaction. In this example

a<->b
b<->a
c<->a
a<->c
b<->c
c<->b

for this we can create one group as (a,b,c). and we need to display list of groups. I need some pointers on how to parse the file and form group? Constraint-> at least 3 user required for creating group. Interaction is nothing but some communication is done between two user. It does not matter of which communication

Subject Author Views Date
Thread How can I parse a tab separated data file and group the extracted data in Perl avs51386 8832 Dec 6, 2011, 2:15 AM
Thread Re: [avs51386] How can I parse a tab separated data file and group the extracted data in Perl
Andy 8657 Dec 6, 2011, 2:23 AM
Thread Re: [Andy] How can I parse a tab separated data file and group the extracted data in Perl
avs51386 8667 Dec 6, 2011, 3:28 AM
Post Re: [avs51386] How can I parse a tab separated data file and group the extracted data in Perl
Andy 8645 Dec 6, 2011, 5:00 AM
Post Post deleted by avs51386
avs51386 8623 Dec 7, 2011, 12:38 AM