in reply to Re^3: Weighted Calculation
in thread Weighted Calculation

However, this also work:   $user_weight{$cols[0]} ||= 1;

That will fail in the case in which the 'special' assigned weight for a worker is zero (maybe he or she is on vacation that week?): such a worker will be assigned a work-weight of 1.

Update: Perl versions lacking  // might use exists:
    $user_weight{$cols[0]} = 1 unless exists $user_weight{$cols[0]};