Implement a sorting algorithm with no change. In this task, you have to write a program, that reads a string with a length of up to 1024 characters and prints it out sorted. In order to make an interesting task from a boring one, I set a few restrictions:

You must not change the contents of any variable. A variable can be assigned only once and must not be changed afterwards. For instance, all of the following constructs are forbidden:

int a = 0;
a = 1;

a = 10;
for (a--&gt;0);

string[12] = a


and many more. What is changing a variable and what not is judged by me.

Additionally, you must not use any sorting function or any library function, that must be "imported" somehow. The only library functions, that are allowed to import are those to print out the result and read in the string, if they are not available whithout importing them.
Perl, 89 characters

sub t{return if!@_;my$c=shift;t(grep{$_ lt$c}@_),$c,t(grep{$_ ge$c}@_)}print t split//,&lt;&gt;


This exploits the fact that QuickSort is effectively equivalent to the recurrence relation:

sorted x = () if x is empty, otherwise
           sorted (elements in x less than x[0]) :: x[0] ::
           sorted (elements in x greater than or equal to x[0] except for x[0] itself)


Edit

I originally misread the question and thought I had to sort the input strings, not the characters within a string. Hence my solution grows from 80 to 89 characters.