This is rather strange - removing the 'local' stops the die message from showing up:
% perl-5.34.0 -MMath::GMP -wle 'local $SIG{FPE} = sub { die "divide by
+ zero" };
$z=Math::GMP->new(1); print $z / 0'
Maximal count of pending signals (120) exceeded at -e line 1.
divide by zero at -e line 1.
%
% perl-5.34.0 -MMath::GMP -wle '$SIG{FPE} = sub { die "divide by zero"
+ };
$z=Math::GMP->new(1); print $z / 0'
Maximal count of pending signals (120) exceeded at -e line 1.
%
I don't know why that's occurring. I guess it's possible there's a bug here, but I'm not sure how I might start investigating it. If anything I'd have imagined it working the other way round.