http://qs1969.pair.com?node_id=557772


in reply to Counting the start and end elements in a line

well, it does not directly answer your question, but please use "use strict;" and also "use warnings;"