in reply to Re: Array Cleaning
in thread Array Cleaning

Thanks, this works great.

How I additionally remove all whitespaces from every element (s/\s//g)?

Replies are listed 'Best First'.
Re: Re: Re: Array Cleaning
by artist (Parson) on May 02, 2003 at 18:29 UTC
    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;
    artist