From owner-freebsd-questions@FreeBSD.ORG Tue Apr 25 22:47:59 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A0A0916A400 for ; Tue, 25 Apr 2006 22:47:59 +0000 (UTC) (envelope-from nikolas.britton@gmail.com) Received: from uproxy.gmail.com (uproxy.gmail.com [66.249.92.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1197843D45 for ; Tue, 25 Apr 2006 22:47:58 +0000 (GMT) (envelope-from nikolas.britton@gmail.com) Received: by uproxy.gmail.com with SMTP id m3so1064434ugc for ; Tue, 25 Apr 2006 15:47:58 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=E2zY4k4Kspb+gytpPgXahqecikHjGM9KoxzdWxWF5gi4CTIwTOS7y/w5/v2b3ztJW2WM8TY8/11+cHGGkF1FL91sc5XqLLpdR5jE2AZpxB4wfaq7TrDzdn+lsSJut+8ImXJkxxjGEp4bpvcsoCn6RZ9dw0Uj58qHK0rIK6P8p8w= Received: by 10.78.20.13 with SMTP id 13mr261577hut; Tue, 25 Apr 2006 15:40:49 -0700 (PDT) Received: by 10.78.15.10 with HTTP; Tue, 25 Apr 2006 15:40:49 -0700 (PDT) Message-ID: Date: Tue, 25 Apr 2006 17:40:49 -0500 From: "Nikolas Britton" To: "FreeBSD Questions" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Cc: Subject: Perl: sort string alphabetically, or remove dupe chars? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Apr 2006 22:47:59 -0000 basically what I want to do: my @wordlist =3D (letter, remember, alphabetically); ## some whizbang code that changes words like ## "letter" to "eelrtt", remember to beeemmrr, ## and alphabetically to aaabcehilllpty. @foobar =3D~ tr///cs; #hmm, doesn't work. print "@wordlist\n"; Hmm, that's broke, how about this: my $wordlist =3D "letter"; ## some whizbang regex that removes dupe chars ## from words like "alphabetically" --> "alphbeticy". print "$wordlist\n"; Thanks. -- BSD Podcasts @ http://bsdtalk.blogspot.com/