R
robin
this is some basic stuff, but I think some of you might have fun with
it,
--
#!/perl
use strict;
my @compresponses=('Yes.', ' No.', 'Maybe.', 'Nothing doing.', 'You
might be
crazy to ask that.', 'You are so cool.', 'The magic 8 box likes you',
'Cool!', 'Hmmm.',
'2$#@(&*#&*(*&#$$&(*', 'No way in heck.',, 'Good luck.', 'I like what
you\'re doing with yourself', 'This game sucks.', 'Better luck next
time.',
'Try again.', 'Maybe so.', 'Forever.', 'Difficult to tell.', 'You
really
crack me up.',
'Good, but no cigar.', 'Have a cold beer.', 'Having fun?', 'Good
thinking.',
'Whatever.','Are you implying I am fat?','Go and put the kettle on.','I
want
you to think about what you just asked.','Fourty Two.','It will all end
in
tears.',
'A long time ago in a galaxy far far away...','I\'m late for a very
important date.','That\'s hard to say - I\'ll have to get back to
you.','Such things are not for me to decide.','I have a
dream!','Vanity,
Vanity, All is vanity!',
'Are you always this tenecious?','I could tell you, but then I\'d have
to
kill you.','What do I look like - a fortune teller!?');
my $in;
my $answer;
while ()
{
srand;
print "Ask the magic 8 ball a question: (\"q\" to quit)\n";
$in = <STDIN>;
chomp ($in);
print "\n\n--Mail me at webmaster\@infusedlight.net!--\n\n" and
exit
if $in eq "q";
next if ! $in or $in =~ /^\s*$/;
$answer = $compresponses[int rand @compresponses];
print "ANSWER: $answer\n\n";
sleep 2;
}
it,
--
#!/perl
use strict;
my @compresponses=('Yes.', ' No.', 'Maybe.', 'Nothing doing.', 'You
might be
crazy to ask that.', 'You are so cool.', 'The magic 8 box likes you',
'Cool!', 'Hmmm.',
'2$#@(&*#&*(*&#$$&(*', 'No way in heck.',, 'Good luck.', 'I like what
you\'re doing with yourself', 'This game sucks.', 'Better luck next
time.',
'Try again.', 'Maybe so.', 'Forever.', 'Difficult to tell.', 'You
really
crack me up.',
'Good, but no cigar.', 'Have a cold beer.', 'Having fun?', 'Good
thinking.',
'Whatever.','Are you implying I am fat?','Go and put the kettle on.','I
want
you to think about what you just asked.','Fourty Two.','It will all end
in
tears.',
'A long time ago in a galaxy far far away...','I\'m late for a very
important date.','That\'s hard to say - I\'ll have to get back to
you.','Such things are not for me to decide.','I have a
dream!','Vanity,
Vanity, All is vanity!',
'Are you always this tenecious?','I could tell you, but then I\'d have
to
kill you.','What do I look like - a fortune teller!?');
my $in;
my $answer;
while ()
{
srand;
print "Ask the magic 8 ball a question: (\"q\" to quit)\n";
$in = <STDIN>;
chomp ($in);
print "\n\n--Mail me at webmaster\@infusedlight.net!--\n\n" and
exit
if $in eq "q";
next if ! $in or $in =~ /^\s*$/;
$answer = $compresponses[int rand @compresponses];
print "ANSWER: $answer\n\n";
sleep 2;
}