in reply to Turning numbers to 1!

@{$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].

Replies are listed 'Best First'.
Re^2: Turning numbers to 1!
by perlrocks (Acolyte) on Jul 03, 2008 at 20:50 UTC
    Thanks a lot pal. Now i know why! Pheww! :-)