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

When using print OUT "@F\n", the final line is simply a blank line (unless it contains special characters I cannot see) - although no such line appears on the input. This is also true of @array and printing the non-split line.

Replies are listed 'Best First'.
Re^7: Illegal division by zero error
by Corion (Patriarch) on Feb 01, 2016 at 17:50 UTC

    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.