My Perl 8ball

By [nas]peter on Apr 04, 2012

This is the Perl 8ball script. Works with the command line.

The script has been completely tested.

#!/usr/bin/perl

use strict ();
use warnings ();

my @eightball = ('NOES!','YES!','Without a doubt.','I doubt it','My sources say no.','My sources say yes.','Don\'t count on it.','Get a bath before asking me, damn you smell bad...','Are you out of your mind?','Pay me $20 up front','Lets see it from a psychological point of view...','What kind of crap are you talking about?','Why do you think I know everything?','I don\'t have the time for stupid questions, I am working on myself... Yes I can type with 1 hand...','It\'s your dream, not mine.');

print "Please type your question.\n";
my $var = <STDIN>;

my $Random = int(rand(scalar(@eightball)));
print $eightball[$Random]."\n";

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.