Solve TSP problem in perl