in reply to removing element from an array

1st. copy @shuffled to @discards with reverse() (to start by the ending of the queue)

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