Code:
$ cat infile
abcde,1,2,3,4,
,ee
,ff
,gg
,hh
,mm
abcde,3,4,5,6,
,we
,qw
,as
,zx
,cf
abcde,1,5,6,7,
,dd
,aa
,er
....
....
....
abcde,1,5,4,3,
,kk
,gh
$ perl -pe 'chomp; print qq[\n] if $. > 1 && m/\A(?i:abcde)/ ; print qq[\n] if eof' infile
abcde,1,2,3,4,,ee,ff,gg,hh,mm
abcde,3,4,5,6,,we,qw,as,zx,cf
abcde,1,5,6,7,,dd,aa,er............
abcde,1,5,4,3,,kk