Hi all.
On Sat, Mar 08, 2003 at 08:03:11AM +0200, Octavian Rasnita wrote:
> I know how to create a random number, but could you tell me how can I create
> a random string that have numbers and letters?
I did it like this:
my $stuff = '';
for(1..100) { $stuff .= chr(int rand(96)+32); }
w
> "Octavian" == Octavian Rasnita <[EMAIL PROTECTED]> writes:
Octavian> Hi all,
Octavian> I know how to create a random number, but could you tell me how can I create
Octavian> a random string that have numbers and letters?
Octavian> I would like a result like:
Octavian> 122oijopi3j4po5j5o6j6
Someone may have a better solution, but here is mine:
use strict;
my (@array, $y, $x, $rnd);
until ($y == 10) { push(@array, $y); $y++;}
push(@array, qw(a b c d e f g h i j k l m n o p q r s t u v w x y z));
#Make the @array
$x = 50;#numer of numbers taken
while ($x > 0) {
$rnd = int(
Hi all,
I know how to create a random number, but could you tell me how can I create
a random string that have numbers and letters?
I would like a result like:
122oijopi3j4po5j5o6j6opjop5
Thank you.
Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]
--
To unsubscribe, e-m