in reply to max .. min does not work

If you want to see the list in reverse, use reverse:
perl -e 'for (reverse 1..5) { print "$_\n" };'


Unless I state otherwise, all my code runs with strict and warnings