http://www.perlmonks.org?node_id=1156840


in reply to Switching back and forth between parts of my script

Weight it by chance - say, 75% chance it'll choose an element from @array1, 25% chance it'll choose from @array2. Adjust the % chance based on your needs.