title: What is the probability of collision with a 6 digit random alphanumeric code?
body: <p>I'm using the following perl code to generate random alphanumeric strings (uppercase letters and numbers, only) to use as unique identifiers for records in my MySQL database. The database is likely to stay under 1,000,000 rows, but the absolute realistic maximum would be around 3,000,000. Do I have a dangerous chance of 2 records having the same random code, or is it likely to happen an insignificantly small number of times? I know very little about probability (if that isn't already abundantly clear from the nature of this question) and would love someone's input.</p>
  
  <pre><code>perl -le 'print map { ("A".."Z", 0..9)[rand 36] } 1..6'
  </code></pre>