Why wouldn't it be a number? Presumably, because it is coming from outside, some uncontrolled source. So you should be checking that the input matches your expectations before processing it. This has the dual benefit of avoiding the warning, and making your program safer.
Clint
Comment on Re: Warning-free numerification of a string
Sound advice ... now how would I go about "checking the input matches my expectations", those being that it should be a number, or else converted to zero (preferably without turning off warnings to do so). Ah yes, back to the original question then :-)
Either with Fletch's suggestion of looks_like_number from Scalar::Util, or a regex from Regexp::Common, or if actually, you're just expecting a positive integer, a simple regex like /^\d*$/