in reply to Beautiful code I wrote ;-)

It's beautiful.

And unreadable. If you didn't write it, I'd had no idea what it meant. To decode it you first have to remember that << and >> are bit shift operators (not a big deal), but then you have know their relative precedence, and if they are equal, even their associativity.

If you remember that 2 ** $_ / 2 == 2 ** ($_ -1), you can write it with just one bit shift operation.

Replies are listed 'Best First'.
Re^2: Beautiful code I wrote ;-)
by kalium (Sexton) on Jul 11, 2008 at 16:27 UTC
    Exactly. I think that sort of stuff is fine for your own little personal projects (I to enjoy everytime I discover a more obfuscated way of doing something) , but in the workplace or for Opensource projects it is one of the reasons a lot of people dislike Perl, and fair enough as well.