[ Please do NOT use BCC to post to the list. I almost LARTed your ISP for spam! ]
[ Please do NOT post TOFU. http://www.catb.org/~esr/jargon/html/T/TOFU.html ] [ Please do NOT post MIME. Plain text only please. ] TIA > From: [EMAIL PROTECTED] (Joshua Colson) > > --=-I+4r6wUBW1XZ3HpXebVk > Content-Type: text/plain > Content-Transfer-Encoding: quoted-printable > > How about just: > > @list =3D (qw(two one none zero seven two zero)) > > foreach my $elem ( @list ) {=20 > $list{$elem}++;=20 > } > > @list =3D (); > > foreach my $key ( keys %list ) { > push(@list,$key); > } > > To explain: > Each non-unique element in the list will simply increment the unique > hash key, then read back all the hash keys into your list. > > > On Thu, 2003-07-24 at 12:23, Charles K. Clarkson wrote: > > Juergen Bertram wrote: > > :=20 > > : hi, > > :=20 > > : I need a procedure to eleminate dupes in a @list > > :=20 > > : Ex: @list1 =3D qw(two one two zero six five six seven zero); > > :=20 > > : should be changed to: > > :=20 > > : @list2 =3D qw(two one zero six five seven); > > :=20 > > : There's no need to sort the list. > >=20 [snip] > >=20 > >=20 > >=20 > >=20 > >=20 > >=20 > > --=-I+4r6wUBW1XZ3HpXebVk > Content-Type: application/pgp-signature; name=signature.asc > Content-Description: This is a digitally signed message part > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.1 (GNU/Linux) > > iD8DBQA/IDYlmaVCbcUtCVkRApL+AJ90me1g03qQJHINND/2H+0MSA2D3wCdGXzH > vth9ggnMtce7tlUKFZmW1kE= > =yedu > -----END PGP SIGNATURE----- > > --=-I+4r6wUBW1XZ3HpXebVk-- John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]