reordering perl