D
DMB
I need to write a Perl function that returns a 32 character randomly
generated string of characters.
I tried the following with success, but I thought someone out there
might have a cleaner way to do this.
my @c = 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 0 1 2 3
4 5 6 7 8 9);
my $ID = $c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand
@c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand
@c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand
@c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand
@c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand
@c].$c[rand @c].$c[rand @c].$c[rand @c];
generated string of characters.
I tried the following with success, but I thought someone out there
might have a cleaner way to do this.
my @c = 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 0 1 2 3
4 5 6 7 8 9);
my $ID = $c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand
@c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand
@c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand
@c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand
@c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand @c].$c[rand
@c].$c[rand @c].$c[rand @c].$c[rand @c];