Help in file parsing with awk

Hi,

I have a data set as shown below:

09e757fd,22727,2012-03-01,text1,text2,to
3fd0cae7,310,2012-03-01,text3,text4,to
3fd0cae7,310,2012-03-01,text3,text5,to
3fd0cae7,311,2012-03-01,text7,text10,cc
3fd0cae7,311,2012-03-01,text7,text11,to
3fd0cae7,312,2012-03-01,text8,text15,to
3fd0cae7,313,2012-03-01,text8,text20,to
3fd0cae7,313,2012-03-01,text8,text22,to

Result should be:

text1		text2
text3		text4, text5
text7		text10, text11
text8		text15
text8		text20, text22

Concept:

The combination of first two fields in every row forms the unique combination for the fields 4 and 5. I need 4th and 5th field of all those rows which has the unique combination of 1st and 2nd field of the rows.

Any help will be highly appreciated.

Thanks a lot.

perl -F, -lane '
(defined $x{"$F[0],$F[1]"} && $x{"$F[0],$F[1]"} =~ /$F[3]/) ? ($x{"$F[0],$F[1]"} .= "$F[4],") : ($x{"$F[0],$F[1]"} .= "$F[3],$F[4],");
END {
    for (sort keys %x) {
        @x = split /,/, $x{$_};
        print "$x[0]\t", join (",", @x[1..$#x]);
    }
}' inputfile
awk -F, '{n=$1 FS $2}p!=n{if(s)print h"\t"s; s=x}{s=s (s?", ":x) $5; h=$4; p=n} END{if(s)print h"\t"s}' infile

-or-

awk -F, '{n=$1 FS $2; S[n]=S[n] (S[n]?", ":x) $5; H[n]=$4} END{for(i in H) print H"\t"S}' infile | sort

Thanks a lot balajesuri and scrutinizer for a prompt reply... that worked....