use autobox; my @nums = 1->to(10); my @reverse = 10->to(1);