or download this
my $x = ("The answer to the ultimate question of life, the universe
+, and everything" but 42 but false but undef);
print "Number: " . (0+$x) . "\n";
print "String: " . $x . "\n";
print "Boolean: false\n" unless $x;
print "Undefined" if not defined $x;