| [reply] |
| [reply] |
salva,
Using the DB approach would allow the use of Data::UUID.
- If input string exists, return key
- If not, generate new one, store it, return it
| [reply] |
| [reply] |
I would use a one-way-function for that. See here for some explanation on one-way-functions. Although in your case it might be overkill, i.e. you don't state that it has to be difficult/impossible to calculate the original out of the generated code. Still a one way function does what you want. Take a look at some of the Crypt modules.
| [reply] |
a simple sample code, by googling.
#!/usr/bin/perl
use Digest::MD5 qw/md5_hex/;
while(<>) {
print md5_hex($_)," $ARGV\n";
}
| [reply] [d/l] |
Why not simply use john to identify the record with $value eq 'john'? | [reply] [d/l] |