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; }
In reply to RE: Array Help
by turnstep
in thread Array Help
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |