in reply to Re^2: avoid warnings in Copying and Substituting Simultaneously
in thread avoid warnings in Copying and Substituting Simultaneously

And that needlessly performs a regexp. And since perl still has to do the ascii to numeric conversion, you might as well do it right away.
{ no warnings 'numeric'; $totcalls += $layer3; }
And that will even work if $layer3 starts with a negative number or a float. It's a design feature that Perl works this way.