<[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi > > I'm trying to write a new script that will automatic show a pop up window > with a random username and password for my members section. ...snip... > Can someone how tell me how to begin and what the format looks like for > the random generation?
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); } Todd W -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]