CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced: Re: [webhay] return value from function: Edit Log



Paul
Enthusiast

Jan 2, 2003, 4:04 AM


Views: 1602
Re: [webhay] return value from function

If you are going to generate a random string, make it easy for yourself a least :)


Code
sub my_rand { 
my @rand = ('A'..'Z','a'..'z',0..9);
my $high = 32;
my $rand;
$rand .= $rand[rand @rand] for (0..$high);
return $rand;
}



(This post was edited by Paul on Jan 2, 2003, 4:05 AM)


Edit Log:
Post edited by Paul (Enthusiast) on Jan 2, 2003, 4:05 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives