1: foreach(split/,/,"74,43,-2,1,-84,65,13,1,5,-12,-3,13,-82,80,-11,13,-6,-76,72,-7,2,8,-6,13")
   2: {$a+=$_;print chr $a;}

Replies are listed 'Best First'.
RE: This, too, was wasted on my wife.
by chromatic (Archbishop) on May 01, 2000 at 18:51 UTC
    I like one liners: print chr($a += $_) foreach qw (74 43 -2 1 -84 65 13 1 5 -12 -3 13 -82 80 -11 13 -6 -76 72 -7 2 8 -6 13); Your wife must be pretty picky -- I liked this one.
      THAT is pretty slick.

      I'm ass-u-me-ing that the "foreach" construct is treated kinda-sorta like a function?

      BTW, my wife thinks that these are the "geekiest" things she's seen me do.

        actually, the "foreach" in the one-liner above is treated as more like my personal fav'rit use of "if", i.e.
        print $line if $line =~ /Perl/;
        e.g. "do this IF that"; similarly, the "foreach" says "do this for each of these." It's with constructs like these that you can tell Perl was designed by a linguist =)
      Ah, but did your wife? :)
RE: This, too, was wasted on my wife.
by Anonymous Monk on Apr 29, 2000 at 02:00 UTC
    mate, that's poor
      Righty-right, o me brother.

      Would you so kindly enlighten me as to the specifics?

      It's one thing to say "it sucks." It's quite another to say "it sucks, because...."

      At least the latter would help be to become a better programmer.

      The former just pisses me off, especially from one who lacks the intestinal fortitude to take the trouble to identify him/herself.

        I agree. You can't say it sucks with out an explanation.
        As for me, I don't think it sucks. But I also don't think it is obfuscated. Perhaps this is because it is really similar to the program I posted a couple days ago in the obfuscated section and so I see exactly what it is doing. So while I don't think it sucks, I do think it is un-original and less then obfuscated.

        NOTE: I've noticed that this is actually filed under Craft, and not Obfuscated code... I would have sworn I saw this under obfuscated.

      From the safety of anonymity, it is easy to cast aspersions. This code does not "suck," as you so elegantly put it.
      Perhaps this metaphor will elucidate my position as stated in the last sentence. When flying an airplane, there are two kinds of landings. Any landing you can walk away from is a good one. Likewise, any code that runs is in some wise also "good."
      I agree with the initial poster (see below). Voting down without explanation or simply stating "it sucks" without further justification of your point of view helps no one; indeed it makes the one who cried "suck" look even less intelligent. If you have reasons for your feeble objection to cciulla's post, share them. If not, everyone here would be better off, including you.