in reply to Array Help

It may be homework, but at least they are learning in a good language. :) Some intro classes use LISP. Two other ways:

for (1..10) { push @num, (int rand 3)+1 } for (@num) { print unless $seenit{$_}++; } for $x (1..3) { print $x if grep {/$x/} @num; }