Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^5: Native newline encoding

by sauoq (Abbot)
on May 23, 2012 at 01:08 UTC ( #971920=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Native newline encoding
in thread Native newline encoding

So, your assumption is that he's not going to use the information; just discover it and then what?

No, I'm not making an assumption.

You were assuming he was going to use it to process line endings. I've already pointed out that the information could be used in other ways.

Hide information that is common knowledge

Are you being purposefully obtuse? This doesn't seem like the BrowserUk I know. The point was that you are succumbing to a certain detrimental philosophy: there are things you just don't need to know, don't worry about them, let other people the OS handle it for you.

The OP asked a straightforward question. I answered it. And your response is to say it shouldn't be answered.

I can't pretend to respect that way of thinking. Or avoidance thereof.

-sauoq
"My two cents aren't worth a dime.";


Comment on Re^5: Native newline encoding
Re^6: Native newline encoding
by BrowserUk (Pope) on May 23, 2012 at 01:29 UTC
    The point was that you are succumbing to a certain detrimental philosophy: there are things you just don't need to know, don't worry about them, let other people the OS handle it for you.

    Quite the opposite.

    I know salva's work; and can easily deduce from it, that his knowledge is more than sufficient to know what the on-disk line endings are on all the popular platforms.

    Hence, I knew that he wasn't asking "What are the line endings"?

    The question he asked was quite different to the one you continue to insist on answering.

    Further, based on my awareness of salva's knowledge and skills; I recognised that his actual question could not really be answered correctly without understanding the purpose to which the information obtained was going to be put to.

    Hence, I asked questions, rather than offering up functionally useless information.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    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.

    The start of some sanity?

      The question he asked was quite different to the one you continue to insist on answering.

      Oh. I see.

      Please enlighten me.

      What question did he ask when he wrote:

      I am looking for a way to easyly detect the native newline encoding of the OS running my perl script. Besides using a table to infer it from $^O, is there any other way to detect it?

      And what question did I answer?

      This:

      Hence, I knew that he wasn't asking "What are the line endings"?
      by the way, is neither. That's just something that you apparently pulled out of thin air.

      And, you know, I really am not even sure that you understand the code you provided was completely useless. At first I thought you made an honest mistake in a hasty answer... then I thought maybe you were giving a brain dead example to make a (not so good) point, and now I'm really not so sure again.

      -sauoq
      "My two cents aren't worth a dime.";
        This: Hence, I knew that he wasn't asking "What are the line endings"? by the way, is neither. That's just something that you apparently pulled out of thin air.

        No. You raised that when you tried to suggest that I was trying to hide something.

        then I thought maybe you were giving a ... example to make a ... point

        OoooooW And you were so close ... but then no. The stupidity kicked in again.

        The point of the example -- that was clearly followed with the question: "Maybe not so useful depending upon your purpose?" -- was to point out that the value of "\n" is not OS dependent; but rather encoding dependent!.

        That what characters will end up on disk when you write a newline to a file, cannot be determined from discovering what OS you are running under alone

        .

        A point that I'm pretty sure that salva will have got from my original post, but one that you so completely missed, and are still trying arm-wave, distract and dissemble your way past.

        I'm done now, waffle on all you like.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        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.

        The start of some sanity?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://971920]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2014-10-20 04:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (72 votes), past polls