in reply to Re: Help with function, count matches and store in hash & retrieve sorted
in thread Help with function, count matches and store in hash & retrieve sorted

if($#array){ $indexfile->{$array[1]} = $array[0]; }

There may be a problem here. The statement
    $indexfile->{$array[1]} = $array[0];
will be executed if the  @array array is empty ($#array == -1; -1 is true), or if the  @array array has two or more elements ($#array > 0). Is this what you want? (See discussion of the  $# sigil (e.g., $#array) in perldata.)


Give a man a fish:  <%-{-{-{-<