My Tribute to Douglas Adams

DarkKnightRadick on 2003-07-01T19:18:18

#!/usr/bin/perl -w #I have a feeling the answer will be 42

print "I have a feeling the answer will be the answer to Life! The Universe! And Everything!\n"; print "Please input the first number:"; chomp($first_num = ); print "Please input the second number:"; chomp($second_num = ); $answer = $first_num * $second_num;

if ($answer != 42) { print "$first_num times $second_num is not the answer to Life! The Universe! And Everything! It's actually just $answer\n"; } else { print "You know the answer to Life! The Universe! And Everything!\n"; }