in reply to Re: Remove redundency from an array
in thread Remove redundency from an array

Better to use either a lexical hash in the do-block, or an anonymous hash:
@array = keys %{ {map {$_,undef} @array} };

Caution: Contents may have been coded under pressure.