in reply to How to remove duplicate characters in a string in place

If you have a recent version of List::MoreUtils

use List::MoreUtils qw( singleton ); my $str = join '',singleton split '',"abcdefghiaabccdjklm"; print $str;
poj