J
Jerry Preston
@dat = qw( 9 5 12 14 17 20 11 2 10 15 6 5 14 17 16 25 12 24 );
I want to removes all the duplicates. I am currently using:
@dat = grep { !$dat{ $_ }++ } @dat;
99% of the time I get an empty array. Why? Is their a better/100% way?
Thanks,
Jerry
I want to removes all the duplicates. I am currently using:
@dat = grep { !$dat{ $_ }++ } @dat;
99% of the time I get an empty array. Why? Is their a better/100% way?
Thanks,
Jerry