in reply to Re:^2 Remove repeated characters from a string
in thread Remove repeated characters from a string

Anonymous Monk,
Then it sounds like the code I provided is on the right track. It would need to be modified a bit to take into account your additional requirements. Again, this is why it is important to explain your problem without assuming things are just "understood".
#!/usr/bin/perl use strict; use warnings; my $string = 'One bright day in the middle of The Night'; my (%seen, $new_string); for my $char ( split // , $string ) { $char = lc $char; next if $seen{$char} || $char !~ /^[a-z]$/; $seen{$char}++; $new_string .= $char; last if length $new_string == 26; } print "$new_string\n";
I hope this helps - L~R