for $value (LIST) { $ARRAY[++$#ARRAY] = $value; } #### while (($this,$that)= each(%list)) { add each $this and $that into the array sort out array by numerics (highest $that (which is always a number) will be on top).