Re: Perl: sort string alphabetically, or remove dupe chars?

2006-04-27 Thread Andrew Reitz
On Apr 26, 2006, at 12:34 AM, Nikolas Britton wrote: On 4/25/06, Parv [EMAIL PROTECTED] wrote: [snip] Thanks parv... I meant the algorithm was clunky, not the code... I'm so new at this that I can't read your code, and I have a hard enough time reading mine own :-). I've got another simple

Re: Perl: sort string alphabetically, or remove dupe chars?

2006-04-27 Thread Nikolas Britton
On 4/27/06, Andrew Reitz [EMAIL PROTECTED] wrote: On Apr 26, 2006, at 12:34 AM, Nikolas Britton wrote: On 4/25/06, Parv [EMAIL PROTECTED] wrote: [snip] Thanks parv... I meant the algorithm was clunky, not the code... I'm so new at this that I can't read your code, and I have a hard

Re: Perl: sort string alphabetically, or remove dupe chars?

2006-04-26 Thread Nikolas Britton
On 4/25/06, Parv [EMAIL PROTECTED] wrote: in message [EMAIL PROTECTED], wrote Nikolas Britton thusly... This works... but it's clunky: my $string = letter; my @chars = split(, $string); $string = ; @chars = sort (@chars); foreach (@chars) { $string .= $_; } $string =~

Re: Perl: sort string alphabetically, or remove dupe chars?

2006-04-25 Thread Nikolas Britton
On 4/25/06, Nikolas Britton [EMAIL PROTECTED] wrote: basically what I want to do: my @wordlist = (letter, remember, alphabetically); ## some whizbang code that changes words like ## letter to eelrtt, remember to beeemmrr, ## and alphabetically to aaabcehilllpty. @foobar =~ tr///cs; #hmm,

Re: Perl: sort string alphabetically, or remove dupe chars?

2006-04-25 Thread Parv
in message [EMAIL PROTECTED], wrote Nikolas Britton thusly... On 4/25/06, Nikolas Britton [EMAIL PROTECTED] wrote: basically what I want to do: ... my $wordlist = letter; ## some whizbang regex that removes dupe chars ## from words like alphabetically -- alphbeticy. print $wordlist\n;