Sneaker In Perl

To aid in this sneaker wearing, I've written a little program to do the decision for me.

Requirements

How does it work?

Quite well, thank you...

If it is fed the date in the form of YYYYMMDD, it uses that as the seed to the randomizer. Otherwise, it uses today's date (also in the form of YYYYMMDD). Then, it generates a seperate number for left and right within the number of colors (seven, in my case). It cuts down on the chance of the left and right sneaker being the same by re-randomizing if the left and right numbers match. Then, it uses the left and right numbers as indices to the colors array and prints that.

Retrospective,

It was Mike MacHenry who suggested seeding on the date instead of storing the values in a database. And by database I mean file.

I thought it was easier to get the date by shelling out than using a function call. And you know, I was probably right.

Navigate this Web site.

Contact.