Todd Wade wrote at Sat, 06 Jul 2002 21:25:24 +0200:

> 
> I might use something like this:
> 
> #!/usr/bin/perl -w
> 
> use strict;
> 
> print 'uid: ', random_string(), "\n";
> print 'pwd: ', random_string(), "\n";
> 
> sub random_string {
> 
>   my($string) = '';
>   my($length) = 6;
>   my(@chars) = ('A' .. 'Z', 'a' .. 'z', 0 .. 9);
>   while (length($string) != $length) {
>     $string .= $chars[ rand($#chars) ];
>   }
>   return($string);
> 

I would be too lazy to write my own random_string subroutine.
I think String::Random would be my favourite :-)

Cheerio,
Janek

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to