or download this
C:\Code>perl adjacent.pl
*----------------------------------------------*
Gene1,Gene2,Gene3,Gene4,spc1=5,spc2=5,spc3=2,spc4=1,spc5=1
GeneA,GeneB,GeneC,GeneD,GeneE,GeneF,spc1=3,spc2=3,spc3=1,spc4=1
GeneX,GeneP,GeneY,spc1=1,spc2=1,spc3=1,spc4=1