in reply to Re^2: CGI Dynamic Query
in thread CGI Dynamic Query

You are getting that error because @files is empty - you should really check it before trying to access.
my @files = (); my $flatest = $_->{filename} for $files[-1]; Modification of non-creatable array value attempted, subscript -1