in reply to Re^5: Snarky comments on the ddj perl quiz
in thread Snarky comments on the ddj perl quiz

I did not know of the other thread when I started this one. However, I became aware of the quiz as a result of a chatterbox comment that may have resulted from the other thread. Just in case anybody cares.

I admit to being a little puzzled by the "already" so long after the fact, but thought the link to the other thread was a good thing.

  • Comment on Re^6: Snarky comments on the ddj perl quiz

Replies are listed 'Best First'.
(OT) Re^7: Snarky comments on the ddj perl quiz
by Argel (Prior) on Aug 30, 2007 at 19:34 UTC
    I admit to being a little puzzled by the "already" so long after the fact, but thought the link to the other thread was a good thing.

    I could swear that I saw the other thread on Monday and later in the day this one appeared. Other than Seekers of Perl Wisdom I usually rely on just The Monastery Gates so a thread may be a few days old but will appear to be "new" to me if it was recently frontpaged. So it's either a question of when they were frontpaged or if I saw the other one while somehow missing this one. Sorry for any confusion!

    Update: And sorry about sort of hijacking your thread.

      Our thread, for us to use and abuse as any of us see fit.

      Did you know that:

      $x = "1.1"; $y = 0+$x;
      leaves $x taking less memory than
      $x = 1.1; $y = "$x";
      ?
        LOL!! No I didn't and asking why is certainly worthier than some of those DDJ questions! Okay, so I'll bite -- why does it use less? I really do not know enough about perl to answer that one and my C is getting very rusty. Still, I doubt a three element char* uses more memory than a float so this sounds like a Perl-ism. Does perl end up storing a numerical and a string version in the second example while just converting from a string to a numeric in the first example? Or put differently, does the first example give perl a better hint? Is this part of the Perl spec or just a side effect of the perl implementation?