display unique number

Hi,

how i can display all the unique number from my random number script below;

#!/usr/bin/perl
use strict;

my @alphanum = ( 'A' .. 'Z', 'a' .. 'z', 0 .. 9);
my $random = join('', map($alphanum[rand($#alphanum)],(1..5)));

print "$random\n";

Thank You.

Looks like a homework, but still - what have you done so far, did you write this script ? Hint : check for existence of digit, then extract the unique ones. Look for perl regex, there are many examples in the forum.