in reply to "" isn't numeric...

This is just a warning, not an error. You could always use the ||= operator to force an empty string to 0

use warnings; my $numb = ''; print $numb + 5; # issues warning $numb ||= 0; print $numb +5; # no warning
It is a minor nuisance, but it is a nice warning to know about it, as it might lead to unexpected results down the road.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re^2: "" isn't numeric...
by davidrw (Prior) on Oct 14, 2005 at 20:01 UTC
    i tend to do that inline, too:
    my $numb = ''; print 5 + ($numb||0); # no warning
    I also do the same thing to avoid "Use of uninitialized value in concatenation (.) or string" warnings:
    print "==> Foo: " . ($s || '') . "<===\n";