in reply to Collapsing a string to unique characters

35 (Unix):
-nE'@_=();@_[ord]=$_ for/./g;say@_'

Replies are listed 'Best First'.
Re^2: Collapsing a string to unique characters
by BrowserUk (Patriarch) on Jan 09, 2009 at 15:49 UTC

    Anywhere, any version: 32

    -ple$_=join'',sort/./g;tr/!-~//s
      Anywhere
      Nope, it'll fail on an EBCDIC platform as the ~ is somewhere between the 'r' and the 's'.
Re^2: Collapsing a string to unique characters
by Corion (Patriarch) on Jan 09, 2009 at 15:11 UTC

    Applying my same tricks, you can replace the @_=();say@_ initialization by @_=!say@_, which is two chars shorter,yielding 31 on Windows and 33 on Unix:

    -nE@_[ord]=$_,for/./g;@_=!say@_