Obfuscation: Comparing the size of two arrays

~~@x ~~ ~~@y

is true if @x and @y have the same number of elements.

This rather elegant obfuscation uses the smart match operator as well as double bitwise negation.

1 Comment

That is pretty sick and twisted. I like it. :) It's the longer what to write @x == @y.

Leave a comment

About Marcel Grünauer

user-pic perlservices.at is a B2B service provider for Perl in Vienna, Austria. I'm a professional software developer since 1989 and a Perl specialist since 1998. I also like Go (囲碁), Japanese and Korean culture and language.