#Perl, 88 bytes
Perl, 88 bytes
@_=/./g;a:{for(0..@_-2){@_[$_,$_+1]=@_[$_+1,$_],redo a if uc$_[$_]gt uc$_[$_+1]}}print@_
Just a simple Bubble Sort. Call with -n option to pass the text.
e.g:
echo "tThHiIsS" | perl -n sort2.pl
Output:
hHiIsStT
#Perl, 88 bytes
@_=/./g;a:{for(0..@_-2){@_[$_,$_+1]=@_[$_+1,$_],redo a if uc$_[$_]gt uc$_[$_+1]}}print@_
Just a simple Bubble Sort. Call with -n option to pass the text.
e.g:
echo "tThHiIsS" | perl -n sort2.pl
Output:
hHiIsStT
Perl, 88 bytes
@_=/./g;a:{for(0..@_-2){@_[$_,$_+1]=@_[$_+1,$_],redo a if uc$_[$_]gt uc$_[$_+1]}}print@_
Just a simple Bubble Sort. Call with -n option to pass the text.
e.g:
echo "tThHiIsS" | perl -n sort2.pl
Output:
hHiIsStT
#Perl, 8688 bytes
@_=/./g;a:{for(0..@_-2){@_[$_,$_+1]=@_[$_+1,$_],redo a if uc$_[$_]>uc$_[$_+1]uc$_[$_]gt uc$_[$_+1]}}print@_
Just a simple Bubble Sort. Call with -n option to pass the text.
e.g:
echo "tThHiIsS" | perl -n sort2.pl
Output:
hHiIsStT
#Perl, 86 bytes
@_=/./g;a:{for(0..@_-2){@_[$_,$_+1]=@_[$_+1,$_],redo a if uc$_[$_]>uc$_[$_+1]}}print@_
Just a simple Bubble Sort. Call with -n option to pass the text.
e.g:
echo "tThHiIsS" | perl -n sort2.pl
Output:
hHiIsStT
#Perl, 88 bytes
@_=/./g;a:{for(0..@_-2){@_[$_,$_+1]=@_[$_+1,$_],redo a if uc$_[$_]gt uc$_[$_+1]}}print@_
Just a simple Bubble Sort. Call with -n option to pass the text.
e.g:
echo "tThHiIsS" | perl -n sort2.pl
Output:
hHiIsStT
#Perl, 8886 bytes
@_=/./g;a:{for(0..@_-2){@_[$_,$_+1]=@_[$_+1,$_],redo a if uc$_[$_]gt uc$_[$_+1]uc$_[$_]>uc$_[$_+1]}}print@_
Just a simple Bubble Sort. Call with -n option to pass the text.
e.g:
echo "tThHiIsS" | perl -n sort2.pl
Output:
hHiIsStT
#Perl, 88 bytes
@_=/./g;a:{for(0..@_-2){@_[$_,$_+1]=@_[$_+1,$_],redo a if uc$_[$_]gt uc$_[$_+1]}}print@_
Just a simple Bubble Sort. Call with -n option to pass the text.
e.g:
echo "tThHiIsS" | perl -n sort2.pl
Output:
hHiIsStT
#Perl, 86 bytes
@_=/./g;a:{for(0..@_-2){@_[$_,$_+1]=@_[$_+1,$_],redo a if uc$_[$_]>uc$_[$_+1]}}print@_
Just a simple Bubble Sort. Call with -n option to pass the text.
e.g:
echo "tThHiIsS" | perl -n sort2.pl
Output:
hHiIsStT