in reply to can a script change itself?

If it does not have to increment, you can do:
my $id = crypt($firstname,$lastname);
Where "$firstname" is 'crypted' using "$lastname" as the salt. I wouldn't use to this to store any passwords, but it is way to calculate (and retrieve) their record in the future by being able to predict their id rather than searching for them. You could also use md5.

Replies are listed 'Best First'.
Re^2: can a script change itself?
by Anonymous Monk on Mar 24, 2005 at 16:56 UTC
    Well, if the OP was satisfied to have unique strings, he could have taken the $firstname.$lastname in the first place. Which actually has a better chance of being unique than your suggestion - as it will return the same string for "John Black" and "John Blueberry".