in reply to Having repeated intances become one in Array
#!/usr/bin/perl my @array = qw[ foo bar baz bar foo baz baz bad ]; sub dedupe { ${_}=do{{},[],{}};@{${_}}{@_,%_,@_}=$|;keys%{\%{${_}}} } print dedupe(@array);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Having repeated intances become one in Array
by Anonymous Monk on Aug 09, 2002 at 22:47 UTC |