in reply to Re^2: Use of uninitialized value in substr
in thread Use of uninitialized value in substr
This is not about " concatenating undef to a string.".
That's exactly what happens to the 4th arg of substr.
Yes, you could suppress it, but why should you have to for something that could not possibly by "by accident".
eh? Of course you can pass an undefined value to substr by accident.
The real question is about making explicit undef semantically different from indirect undef
ah! There wasn't even an allusion to this. It's not even an existing concept in Perl as far as anyone is concerned. (Yes, I'm aware there's an instance where literal undef is special in an obscure and unused usage of a builtin, but it's not info I keep in my mind.)
No thanks for this feature. The following come to mind:
It's not one of those cases where I can'tcan provide concrete explanation or example. It just reeks of trouble.
Update: Spelled out some of the reasons.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Use of uninitialized value in substr
by BrowserUk (Patriarch) on May 03, 2010 at 16:20 UTC | |
by ikegami (Patriarch) on May 03, 2010 at 16:42 UTC | |
by BrowserUk (Patriarch) on May 03, 2010 at 17:17 UTC | |
|