help with split

I have a file that reads "#ID, First, P1(40), P2(40), P3(40)..." and I need to split this line up.

I first did @scores = split(/,/, $input);

But I need to split it up and get the the parentheses with numbers split up too, in order to add them together later.

I know I need to do at least one more split, but am not sure how to go about it

$total=0;
for each $element (@scores) {
  if ($element =~ /P\d+\((\d+)\)/) {
    $total+=$1;
  }
}