in reply to Re^4: Use of uninitialized value in substr
in thread Use of uninitialized value in substr

It replaces (a potentially null), part of the target string. That is not concatenation.

Replacing part of a string means concatenating the part that precedes the replacement with the replacement, and that with what follows the replacement.

Did I say you couldn't?

"why should you have to for something that could not possibly by "by accident""

Read again.

Done. Still don't see it. Not in the OP.

Ha! Do it!

Sorry, typo. I meant "It's not one of those cases where I can'tcan provide concrete ..."

rather than examine the up & downsides and then reach a conclusion.

Why do you bother commenting if you think I just make stuff up. You asked for our opinion, so I gave mine. I've already added five of my reasons to the post.

  • Comment on Re^5: Use of uninitialized value in substr

Replies are listed 'Best First'.
Re^6: Use of uninitialized value in substr
by BrowserUk (Patriarch) on May 03, 2010 at 17:17 UTC
    "why should you have to for something that could not possibly by "by accident""

    Explain. How could your use of undef in your example, be "by accident"?

    $s = substr($s,0,1) . undef . substr($s,3);

    The rest. Equally misjudged.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
    A reply falls below the community's threshold of quality. You may see it by logging in.