Hi have a file which consist of following thing
begining of file
----------------------
my name some dfgfgfk jdksjdkls laladsl sdlsdls
.
.
.
kfdjkfdk some drt pro vhdl sdjls.
----------------------------------------------------------------
ddr.spw.df.df 0 0 0 0 0
ddr.ser.ddf.tp 1 2 3 4 1
ddr.pwq.pro.fgt.tp 1 3 4 5 7
eth.pro.iw 1 2 3 4 5
eth.3po.lk 1 2 5 6 7
eth.3yu.lo 3 4 5 6 9
--------------------------------------------------------
end of file
Now I want to seprate all lines begining with ddr and sum their 5th column, similiarly I want to seprate all lines begining with eth and sum their 5 column. The top portion of file as shown might consist of some paragraph which don't need to consider. So please can anyone help with perl script to perform this operation.