# scalar returns the number of elements in an array my $n = scalar(@aSomeNumbers); my $n1=int($n/2); my $n2=$n-$n1;