http://www.perlmonks.org?node_id=1007840


in reply to Re^2: What is wrong in this code???
in thread What is wrong in this code???

Yes but where, can you tell me?

Inside the loop where you iterate over the records, before you start counting the characters.