It doesn't look like that you have white spaces in the numbers. To resolve your problem, just in case.. you can put our code before the @array using map.
my %X;
@clean_ord_array =
grep {!defined $X{$_} and $X{$_} = 1 }
grep /\d+/,
map { s/\s//g } @array;