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: <%-{-{-{-<
In reply to Re^2: Help with function, count matches and store in hash & retrieve sorted
by AnomalousMonk
in thread Help with function, count matches and store in hash & retrieve sorted
by Pathogenomix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |