A script for match people with each other to get gift to each other.
It is a known tradition to get presents on New Year's Eve and for schools and work places it is another tradition to have a draw to match persons. For example in a 3 person group draw results may be
1 -> 3
2 -> 1
3 -> 2
The points in this draws are:
- Everybody gets a present
- Nobody gets himsel/herself as a match
- No body knows the whole draw results until the present giving time.
It is easy to do it when peaople can get in one place, but it is hard to have a draw like that when people are away from each other. One can make the draw and release the results one by one but the s/he knows all the results. So I wrote a small script. It handles the draw and mails the results, nobody sees the list, surprise did not broken.
- $alici and $verici arrays should be in same order.
- We had a problem with hotmail, our friend did not get the e-mail.