in reply to Re: converting strings to ints
in thread converting strings to ints
Why will perl silently convert non-blank strings to integers, but resist converting a blank string to 0?
It doesn't resist it. It does exactly that. But, you've asked (via use warnings) to be informed of things that might not be right. Always assuming that '' means 0 in a numeric context, when it could mean an absence of data, would be taking DWIM too far.
|
|---|