in reply to Re^6: Illegal division by zero error
in thread Illegal division by zero error

Why do you print out @F when you want to inspect the contents of $_?

Maybe you want to add the following line in a strategic place of your script?

print "Now processing [$_]\n";

Consider also adding

use Data::Dumper; print Dumper \@F; print Dumper \@array;

... after you've populated @F and @array.