if $points > $cmp[0] && $quota < $cmp[1] Should be: if $points > $cmp->[0] && $quota < $cmp->[1]