@{$set_S[$s]} + $epsilons[$s];
The first term here is an array. If you use an array in scalar context, it evaluates to the number of items in the array, which happens to be 1 in your case.
If you just want to add the current index to the value, why not just say $s + $epsilons[$s]? Or if you want to access the first item of @{$set_S[$s]}, you can say $set_S[$s][0] + $epsilons[$s].
In reply to Re: Turning numbers to 1!
by moritz
in thread Turning numbers to 1!
by perlrocks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |