Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [Alex] Random Perl Global

Quote Reply
Re: [Alex] Random Perl Global In reply to
A charm indeed! :)

Thanks to both for all suggestions and codes.


Final code for other who are interested...

Build/Templates Globals:

Rand_Numlett

sub {
# Displays random num/lett on page load.
my @random = (0 .. 9, 'a' .. 'z', 'A' .. 'Z');
my $rand = '';
for (1 .. 8) {
$rand .= $random[rand @random];
}
return $rand;
}


In template:

<%Rand_Numlett%>

Subject Author Views Date
Thread Random Perl Global Canoon 7507 Sep 27, 2001, 12:33 PM
Thread Re: [Canoon] Random Perl Global
Paul 7443 Sep 27, 2001, 1:02 PM
Thread Re: [RedRum] Random Perl Global
Canoon 7435 Sep 27, 2001, 1:10 PM
Post Re: [Canoon] Random Perl Global
Paul 7384 Sep 27, 2001, 1:14 PM
Thread Re: [Canoon] Random Perl Global
Paul 7388 Sep 27, 2001, 1:16 PM
Thread Re: [RedRum] Random Perl Global
Canoon 7429 Sep 27, 2001, 1:32 PM
Thread Re: [Canoon] Random Perl Global
Paul 7382 Sep 27, 2001, 1:35 PM
Post Re: [RedRum] Random Perl Global
Canoon 7382 Sep 27, 2001, 1:41 PM
Thread Re: [RedRum] Random Perl Global
Paul 7388 Sep 27, 2001, 1:52 PM
Thread Re: [RedRum] Random Perl Global
Canoon 7417 Sep 27, 2001, 1:57 PM
Thread Re: [Canoon] Random Perl Global
Alex 7373 Sep 27, 2001, 2:53 PM
Thread Re: [Alex] Random Perl Global
Canoon 7399 Sep 27, 2001, 3:06 PM
Thread Re: [Canoon] Random Perl Global
Alex 7363 Sep 27, 2001, 3:13 PM
Thread Re: [Alex] Random Perl Global
Canoon 7432 Sep 27, 2001, 3:21 PM
Thread Re: [Canoon] Random Perl Global
Alex 7382 Sep 27, 2001, 3:26 PM
Post Re: [Alex] Random Perl Global
Canoon 7352 Sep 27, 2001, 3:35 PM
Post Re: [Alex] Random Perl Global
Paul 7328 Sep 28, 2001, 3:49 AM
Post Re: [Alex] Random Perl Global
Sir Up 7225 May 24, 2002, 8:44 AM