my @sorted = sort { my $count_a = $a =~ tr/GC//; my $count_b = $b =~ tr/GC//; $count_a <=> $count_b } @sequences;