in reply to Select three random numbers between 1..10

my @num = map { int( 1 + rand 10 ) } (1..3);
Update: Missed the unique criterion! Try this:
my %num; while(keys %num < 3) { my $x = int( 1 + rand 10 ); $num{$x}++ unless exists $num{$x}; } my @num = keys %num;

-Mark