Hi everyone,

I am creating a script where users can subscribe to multiplt mailing lists, I am storing the emails in seperate text files, say one for each newsletter.

I am also running a contest where one of the people who sign up will win one of three prizes which they select when they sign up, Therefor I somehow need to gather all the emails and pick a random one to be fair. The contest will run for say four weeks then a new one will start. But I will have the option for people to reenter the contest every month so as to prevent people joining mailing lists twice.

Obviously the above creates problems for me, I dont have access to SQl or anything so I cant use a database, only flat files to store the emails.

Is there an easy way to do this, the current way I am having to do this is to get the script to ...
- write to a txt file for that newsletter
- write to a txt file for that contest. Obviously there are three seperate ones.
- write to a main txt file so i can prevent them from resigningup -

Is there an easier way to do this ? This will use huge ammounts of space... Thanks for any help, John

In reply to Flat Files by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.