Adding array elements in Perl

sub add {
  my(@arr1, @arr2);
  my(@result) = ()
  for ($i=0; $i<$@arr1; $i++) {
    push(@result, $arr1[$i] + $arr2[$i]);
  }
  return @result;
}

def add(arr1, arr2):
  result = []
  for i in range(len(arr1)):
    result.append(arr1[i] + arr2[i])
  return result

 
.