in reply to Putting an elemnt in first position in array.
@array = sort { ($a eq 'dog' ? 0 : 1) <=> ($b eq 'dog' ? 0 : 1) } @array; [download]