I read in a book somewhere and can't find it now, that you can use 'tie' or 'bind' to effect a scalar where every time you access it, it can alternate it's values for you.
I want '$color' to alternate between '#cccccc' and '#ffffff' every 10 times I call it.
So the first 10 times I use the '$color' scalar, it will return '#ffffff', and the next 10 times I access it will return '#cccccc'. And it will alternate forever.