Stump The Geeks

april 22, 2006

I hate interviews. I hate being the one interviewed, I hate being the one interviewing. Now that I am with a company that is actually hiring and not laying off, I am getting to interview people more often. Yesterday, I had an interview with a guy who put on his resume that he knew PHP, Perl, Unix and some other stuff. So, I wanted to find a way to test his knowledge. I came up with this simple, yet oh so deceptive question... Tell me what this Perl script will output:

$a = 20; $b = 4; $q = $a + $b; $r = $a - $b; $s = $a / $b; $t = $a x $b; print $q,$r,$s,$t;
Looks easy, huh? I tried it on JR and his output was: You're a bastard. Heh. Of course, he fired back with this one quite a clever one also, which had me responding...well: You're a bastard. Heh. By the way, the Perl question is not as simple as it looks.  And no, there are no typos in there -- but, you get 2 points if you thought there was!