Ahh, I understand. My problem was with misunderstanding GD::Graph, not the sort. I was using square brackets because that made the GD::Graph module show up correctly, but the sort wouldn't work correctly. Now using "( )" and \@array, which causes it to show up correctly.
Is there a way to remove duplicate values using sort or would I have to do a loop to remove them?