Phoenix.pm: Please help, my brain is fried
Kevin Buettner
kev at primenet.com
Wed Jan 26 20:56:10 CST 2000
Shay,
Below is another approach to solving the problem you posted about
recently. I like it because it is concise and contains no explicit
loops.
#!/usr/bin/perl
print create_login_id(), "\n";
sub create_login_id {
return join('', map $_->[int(rand(52))],
(['a'..'z','A'..'Z']) x int(rand(6)+6));
}
--
Kevin Buettner
kev at primenet.com, kevinb at redhat.com
More information about the Phoenix-pm
mailing list