willa has asked for the wisdom of the Perl Monks concerning the following question:
Given a colon-separated file, how do you count the number of lines with an identical second field that have different third fields? For example, if you gave it:
It would come back with:fruit:apple:cox fruit:apple:pippin fruit:apple:granny fruit:banana:yellow fruit:banana:green
apple 3 banana 2
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Counting lines by content
by broquaint (Abbot) on Oct 09, 2002 at 11:19 UTC | |
by willa (Acolyte) on Oct 09, 2002 at 11:35 UTC | |
by broquaint (Abbot) on Oct 09, 2002 at 11:45 UTC | |
by willa (Acolyte) on Oct 09, 2002 at 13:03 UTC | |
Re: Counting lines by content
by sch (Pilgrim) on Oct 09, 2002 at 11:25 UTC | |
by l2kashe (Deacon) on Oct 09, 2002 at 13:47 UTC | |
Re: Counting lines by content
by Anonymous Monk on Oct 09, 2002 at 15:57 UTC | |
Re: Counting lines by content
by hackmare (Pilgrim) on Oct 10, 2002 at 11:05 UTC |
Back to
Seekers of Perl Wisdom