in reply to Re^3: Remove redundency from an array
in thread Remove redundency from an array
The first code block in the FAQ says:
The first comment is my solution and the second is essentially the same as bruceb3's. Actually, I don't see where the FAQ suggests using splice for this.my %hash = map { $_, 1 } @array; # or a hash slice: @hash{ @array } = (); # or a foreach: $hash{$_} = 1 foreach ( @array );
|
|---|