in reply to Re^2: Warning-free numerification of a string
in thread Warning-free numerification of a string

Not sneaky at all, just contain the no-warnings to where you need it and the requirement is crystal-clear:
{ no warnings 'numeric'; $val1 = $val1+0; # force numeric }