Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I tried this with @numbers = grep {! $seen{$_} ++} @data; but this seems to only extract the numbers if there is only one copy of them. How can I alter this to do what I want?? CHEERSmy @array = ('11','54','23','78','54','54','78'); # i want to extract 11, 54, 23 and 78.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: extracting redundant and unique items
by gmax (Abbot) on May 14, 2003 at 16:22 UTC | |
|
Re: extracting redundant and unique items
by broquaint (Abbot) on May 14, 2003 at 16:13 UTC | |
by chip (Curate) on May 14, 2003 at 16:28 UTC | |
by broquaint (Abbot) on May 14, 2003 at 16:48 UTC | |
|
Re: extracting redundant and unique items
by bigj (Monk) on May 14, 2003 at 19:01 UTC | |
|
Re: extracting redundant and unique items
by AssFace (Pilgrim) on May 14, 2003 at 16:18 UTC | |
by Limbic~Region (Chancellor) on May 14, 2003 at 19:36 UTC | |
by AssFace (Pilgrim) on May 14, 2003 at 19:53 UTC |