There are several advantages to doing this. If you want to make a change to the script, you only have to do it in one place. The next few lines accomplish the widget naming task. If range is 4, rand will return a random number greater than or equal to zero and less than 4. And now, a little drum roll, display the widget.
Lets bring it all together.
Transfer widgets.pl to your cgi directory. You will of course substitute your path instead of mine. Download the Perl Script widgets.pl Click on the next link to display widgets.pl. Don't forget to let me know if you use a random widget so we can give you a free link. Also, let me know what else you would like to see on these pages.