in reply to Session ID Generator (Rolled My Own)
Just a few points.
It's no longer necessary to seed the RNG with srand, that has been automatic for the last few versions of Perl.
The @Chars array can be initialized with the list range operator:
my @Chars = '0'..'9', 'A'..'Z', 'a'..'z';
I'd rename $l so it doesn't look like the first captured match builtin, $1. It could also be generated by
$l = join '', map {$Chars[rand @Chars]} 1..7*($ARGV[0] ||= 1);
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Session ID Generator (Rolled My Own)
by sauoq (Abbot) on Sep 15, 2002 at 04:21 UTC | |
by Zaxo (Archbishop) on Sep 15, 2002 at 05:30 UTC | |
by jerrygarciuh (Curate) on Sep 15, 2002 at 18:10 UTC | |
|
Re^2: Session ID Generator (Rolled My Own)
by Flexx (Pilgrim) on Sep 15, 2002 at 01:36 UTC |