The reverse command reverses the order of the elements in a list, returning the new list.
#!/usr/bin/perl -w @array = (1,2,3,'red'); print "Before: @array\n"; @array = reverse(@array); print "After: @array\n";