in reply to How to generate a unique word or number?

Here's one way. The sequence of strings it produces is non-repeating, and, though very long, not infinite.

{ my $UNIQ_ID = 'a'; sub next_id { return $UNIQ_ID++ } }