Nit: print for reverse @list; is equivalent to print reverse @list; when $, and $\ are equal (as they are by default).