in reply to PP4: "de-hyphenating a file"

Having written that text, I can tell you with some authority...

It's not necessary to anchor it. I put that in there to make it clear that it was happening at the end of the line.

And, \n is always correct there, regardless of the underlying architecture, as the mapping of the local "line ending" character when reading text files. Binary files may show up local-line-ending conventions.

Also realize that that text was written about two or three years before the first MS-DOS port.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re: •Re: PP4: "de-hyphenating a file"
by dragonchild (Archbishop) on Jul 17, 2003 at 17:25 UTC
    And, \n is always correct there, regardless of the underlying architecture, as the mapping of the local "line ending" character when reading text files.

    So, does this mean that $/ is wrong there?

    Also, does this mean that $/ should be relegated only to print statements? Or, will \n also DWIM for other systems?

    ------
    We are the carpenters and bricklayers of the Information Age.

    Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

      I'm not sure where this idea originated but I find the latest perlport to be very guilty of making these things way too confusing...

      $\ is "\n" everywhere. You can change it if you want to, but that is how it starts out.

      Perhaps Re^4: Line Feeds (rumor control) will help clear some of this fog.

                      - tye