I'm running into a problem when I try to modify my referent variable in a foreach loop. According to my O'Reilly perl book, you modify each element in an array by modifying the loop variable inside the loop. Here's what I'm doing and the error message I'm getting. Thanks for your help!
foreach $i ($1, $2, $3, $4, $5) {
$i = int rand( scalar(@numb) + 1 );
pop @numb;
}
Modification of a read-only value attempted at line 7.