2nd. print pop(@discards) to: a) get the first element (the last one), and b) to make it dissapear !
3rd. if you don't want to keep @shuffle you could recover what's left on @discards also with reverse(). And start all over again with one less element.
Hope it helps
In reply to Re: removing element from an array
by chanio
in thread removing element from an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |