use strict; use warnings; print sort f (1,2,3,4,5,6); sub f {($b % 2) <=> ($a % 2)}