my $stat = Statistics::Descriptive::Sparse->new(); $stat->add_data(@array1); my $min_index = $stat->mindex();