..but for some reason it's not working. Is the syntax correct?
If you are using perl version 5.10.0 and above, it should work. Of course the syntax is correct.
However, this also work:
$user_weight{$cols[0]} ||= 1;
The Defined-or operator was implemented in perl 5.10.0 check Defined-or-operator
Update:
Oops, I didn't see tye answer before posting mine, I had this post opened, then got distracted with some other things before submitting my post later. Only to refresh and see that mine post was in a way similar to his.
+1 tye all the same.
In reply to Re^3: Weighted Calculation
by 2teez
in thread Weighted Calculation
by dirtdog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |