in reply to Re: Can you guess what this code does?
in thread Can you guess what this code does?

The correct explicit form is:
s/\r/\n/g;
This can be rendered in emacs using "^Q^M" in place of "\r" and "^Q^J" in place of "\n" (or just the "return" key").

Replies are listed 'Best First'.
Re: Re: Re: Can you guess what this code does?
by japhy (Canon) on Apr 18, 2002 at 13:19 UTC
    Bravo. :) Funny about the backspace thing... when I asked the question on #perl, converter answered the same way, and then corrected himself.

    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a (from-home) job
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;