in reply to split() Problem

It looks as if $edict{$count} uses a counter as its key. Perhaps it is more logical to use an array rather than a hash here?

When you do for $_ (@foo), $_ will sequentially contain the content of each element of the array @foo. Next you do $foo[$_], in other words you index into the array with the value of the element. This is almost certainly wrong, unless you are trying to implement some sort of linked list. I think you just want to use the content of each element and that is already in $_.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James