[ create a new paste ] login | about

Link: http://codepad.org/pwTvg1c1    [ raw code | output | fork ]

Perl, pasted on Nov 15:
1
2
3
4
5
6
7
8
    my $j = "12,11,10,9";
    my @k = split ',', $j;
    @k = sort {$a <=> $b} @k;
    my $k = join ',' , @k; 


print $j,"\n";
print $k;


Output:
1
2
12,11,10,9
9,10,11,12


Create a new paste based on this one


Comments: