Original Usenet thread from alt.ascii-art, started 9 Jul 2005.
perl ascii - magic eight ball
alt.ascii-art
· 1 message · 9 Jul 2005
From: <http://www.perlmonks.org/?node_id=470390>
#!/usr/bin/perl
use strict;
$_=q`seek(D
ATA,30,0);local$/;$_=<
DATA>;/8{6}(.*)8{6}/s;($a=$1)
=~s/\s+(8+\s+)*//g;$a=~s/X/\040/g
;my@eight=split/888/,$a;@eight=split/
8/,$eight[rand(20)];s/(\s+88\s*(8?88)?\
s+)/$b=int((length($1)-length($eight[0]
))\/2);sprintf("%-".length($1)."s","\040"
x$b.shift(@eight) )/eg;print;"88888
888888X8Outlook8 88888 Good8888Outlook8
NotXSo8Good8888 88 88 MyXReply8IsXNo8
888Don't8Count8 88888 OnXIt8888YouXMa
y8RelyXOnXIt888 88 88 8Ask8Again8Late
r8888Most8Likely 88888 8888Cannot8Predi
ct8Now8888X8Yes88 88Yes8Definitely8
888Better8NotXXTell8YouXNow8888ItXIs8Cert
ain8888Very8Doubtful8888ItXIs8Decidedly
8So8888Concentrate8and8Ask8Again8888Sig
ns8Point8ToXYes8888MyXSources8SayXNo8
888Without8a8Doubt888Reply8Hazy,8
Try8Again8888AsXIXSee8It,XY
es888888"`;s/\s//g;eval
;__DATA__
--
Mark Hill
Related ASCII art in the Gallery
Explore these categories from our collection of 11,000+ artworks:
Make your own ASCII art
Turn images, text or 3D into ASCII, or draw your own – right in your browser.
About this thread.
These messages were posted publicly to the newsgroup
alt.ascii-art
in 2005 and are mirrored here unchanged as part of the Historic Archives – only email addresses are masked.
The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can.
Are you one of the authors? Contact us to get your posts attributed, connected to your artist profile, or removed.
Report this message
Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.