in reply to Re^2: Collapsing a string to unique charactersin thread Collapsing a string to unique characters
If speed is your need, then compare this:
sub buk_s { my @c; $c[ $_ ] = $_ for unpack 'C*', $_[ 0 ]; pack 'C*', grep defined, @c; } [download]