in reply to Re^2: Tie::File and Tie::Array::Packed;
in thread Tie::File and Tie::Array::Packed;

Can you please try reducing your code until it becomes small and all the bits unrelated to the problem at hand have been removed?

At first glance at least some of these lines are not related to the problem:

use strict; #use warnings; use CGI::Carp; # can go use List::Util qw(sum); # can go use Math::Random::MT qw(rand); # can go #use Math::Random::MT::Auto qw(rand); use Tie::Array::Packed; use Tie::File;

Please do invest the effort of reducing your script to a small, self-contained script that still exhibits the problem.