What i'm doing is taking numbers out of a string, and then adding them, and then putting them back into a string.
I would guess that you want to pay close attention to this particular warning rather than ignore it. It means that what you have "taken out" is not a numeric substring, but rather an empty string. Depending on how you "put back" the result of your addition, it might not end up being placed where you think it should. For example, if you are doing something like this:
If the initial regex match fails, setting $num to an empty string, then $newnum will either be inserted within the first occurrence of two consecutive spaces, or else not be inserted at all (if the original string never has two consecutive spaces).my ($num) = (/ (\d+) /); my $newnum = $num + $some_other_number; s/ $num / $newnum /;
In reply to Re: "" isn't numeric...
by graff
in thread "" isn't numeric...
by moltar512
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |