Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
#!/usr/bin/perl -w #-*-cperl-*- =pod =head1 NAME B<horoscope> -- see what the stars have in store for YOU! =head1 SYNOPSIS B<horoscope> =head1 DESCRIPTION B<horoscope>, created 1995-08-02, returns YOUR future! kleped it from horoscope.el,v 1.2 1998/12/11 Bob Manson originally wrote this program in ksh, then later converted it to emacs lisp. Noah Friedman rewrote parts of the engine. Dexter Coffin (poorly) converted it to perl and added some stuff, klepping it from horoscope.el,v 1.2 1998/12/11 on 2001/08/13. =cut use strict; use diagnostics; srand ( time () ^ ( $$ + ( $$ << 15 ) ) ); my %horoscope = (); @{$horoscope{'personverb'}} = ( "sit next to you on the bus", "give you good advice", "become pregnant", "kiss you", "make you feel warm and fuzzy", "eat your mail", "lift weights", "hit you", "give you pennies", "share intimate feelings", "throw up", "splode" ); @{$horoscope{'thingverb'}} = ( "replaced", "repaired", "opened up", "rewired", "burped", "kicked", "bathed", "kissed", "petted", "scrubbed", "rubbed", "massaged", "fondled", "excommunicated", "removed", "destroyed", "eaten", "turned" ); @{$horoscope{'planet'}} = ( "Mercury", "Venus", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto", "the Moon" ); @{$horoscope{'number'}} = ( "first", "second", "third", "11th", "392nd" ); @{$horoscope{'side'}} = ( "left-hand quadrant", "right-hand quadrant", "upper half", "lower half", "middle" ); @{$horoscope{'zodiac'}} = ( "Pisces", "Sagitarius", "Cancer", "Leo", "Gemini", "Taurus", "Scorpio", "Aquarius", "Capricorn", "Virgo" ); @{$horoscope{'luckynum'}} = ( "Your lucky number today is 29842924728. Look for it everywhe +re", "12 is your lucky number", "Your lucky numbers are 20, 30, and 40", "Don't forget, it's only 366 days at most until Christmas", "The answer to all your questions is 42", "You will find yourself bound by the Law of Fives" ); @{$horoscope{'animal'}} = ( "dog", "cat", "horse", "elephant", "piglet", "mouse", "rat", "cheetah", "giraffe", "mutant shrimp", "talking fish", "crustacean", "moose", "algae", "amoeba", "penguin on the television" ); @{$horoscope{'action'}} = ( "moving", "thinking", "making love", "straining in the toilet", "washing clothes", "becoming pregnant", "doing something", "asking for a raise", "starting a revolution", "becoming paranoid", "reading mail", "talking with piglet3", "balancing a checkbook", "talking", "gossiping", "stealing from the company", "buying a new computer", "sleeping", "using a Torx \#9 wrench", "telephoning", "not answering the phone", "staying where you are", "cleaning the fridge", "wearing clothes" ); @{$horoscope{'time'}} = ( "months", "days", "years", "seconds", "minutes", "hours" ); @{$horoscope{'attime'}} = ( "today", "tomorrow", "this week", "this month", "right now", "soon" ); @{$horoscope{'value'}} = ( "worthless", "futile", "mysterious", "quite worthwhile", "costly", "a good idea", "unhealthy", "a positive step in the right direction" ); @{$horoscope{'likevalue'}} = ( "worthless", "futile", "mysterious", "quite worthwhile", "expensive", "like a good idea", "unhealthy", "like a positive step in the right direction", "like a maze of twisty passages, all alike", "like a maze of twisty passages, all different" ); @{$horoscope{'noun'}} = ( "dog", "cat", "anteater", "chicken", "television", "computer", "telephone", "abode", "vehicle", "sister", "rhinocerous", "piglet", "alien", "tetrodotoxin", "dinoflagellate", "endothermic therapsid", "life insurance", "child" ); @{$horoscope{'dothing'}} = ( "brush its teeth", "take a bath", "make love", "mow the lawn", "go shopping", "dig", "rotate the TV antenna", "eat worms", "genetically engineer your plants", "drink a bath", "get life insurance from a TV ad" ); @{$horoscope{'evilpeople'}} = ( "Iranians", "Iraquis", "Americans", "god-fearing Crustaceans", "aliens", "\"Bob\"", "the Doctor", "the Dentist", "Frenchmen", "Belgians", "Germans", "piglet-haters", "aliens from Mars", "communists", "socialists", "idiots", "democrats", "republicans", "loonies", "artists" ); @{$horoscope{'evilperson'}} = ( "an Iranian", "an Iraqui", "an American", "a god-fearing Crustacean", "an alien", "a bobbie", "a loon", "a Frenchman", "a German", "piglet-haters", "an alien from Mars", "a Republican", "a Democrat", "a Communist", "a Socialist", "an idiot", "an artist" ); @{$horoscope{'thing'}} = ( "romance", "nasty body odor", "fortune good or bad,", "a gift", "a small bomb", "a flight recorder", "a large dog", "a piglet", "a steering wheel", "a toaster oven with a built-in clock radio", "an egg", "food", "ice", "bad weather", "good weather", "milk", "a deadly disease" ); @{$horoscope{'state'}} = ( "happy", "unhappy", "confused", "sad", "enlightened", "a Borg", "fulfilled", "gay", "tall", "ill", "shrunk", "abused", "tired", "broke", "bemused", "trepidatious", "nonplused", "persecuted", "repulsed", "nausious" ); @{$horoscope{'statenoun'}} = ( "happiness", "unhappiness", "confusion", "sadness", "enlightenment", "bogosity", "fulfillment", "gaiety", "tallness", "illness", "lossage", "bozosity", "weariness" ); @{$horoscope{'color'}} = ( "green", "red", "blue", "black", "brown", "yellow", "orange", "fuscia", "mauve", "plaid", "tope", "hot pink" ); @{$horoscope{'adjective'}} = ( "good", "bad", "indifferent", "valuable", "expensive", "sick", "unhappy", "uneasy", "ambivalent" ); @{$horoscope{'relationship'}} = ( "friend", "enemy", "relative", "coworker", "slave", "flunky", "mother", "sister", "spouse", "fiance", "owner", "parent", "child", "boss", "monk", "mentor", "adept", "neighbor", "corporate stooge", "local convenience store clerk" ); @{$horoscope{'moneystates'}} = ( "unstable", "positive", "financial", "good", "bad", "important", "unimportant", "exposed", "significant" ); @{$horoscope{'vaguenumber'}} = ( "few", "several", "4 or 9", "1 or 7" ); @{$horoscope{'greeted'}} = ( "said hello to", "shook hands with", "met", "talked to", "screwed", "kissed", "fondled gently", "blessed", "gave an organ to" ); @{$horoscope{'times'}} = ( "once", "twice", "a few times", "5 or 11 times", "3 to 6 times", "thrice", "988,122 times" ); @{$horoscope{'consider'}} = ( "ponder", "think about", "consider", "try", "make a stab at", "meditate upon", "look at deeply", "mull", "contemplate" ); @{$horoscope{'zodplace'}} = ( ${$horoscope{'zodiac'}}[rand @{$horoscope{'zodiac'}}], "the ${$horoscope{'number'}}[rand @{$horoscope{'number'}}] hou +se of ${$horoscope{'zodiac'}}[rand @{$horoscope{'zodiac'}}]", "the ${$horoscope{'side'}}[rand @{$horoscope{'side'}}] of ${$h +oroscope{'zodiac'}}[rand @{$horoscope{'zodiac'}}]" ); @{$horoscope{'thingstodo'}} = ( "set your clock", "get married ${$horoscope{'attime'}}[rand @{$horoscope{'attime +'}}]", "dye your hair", "move away", "exercise", "have your ${$horoscope{'noun'}}[rand @{$horoscope{'noun'}}] s +payed or neutered", "watch Dr. Who", "watch Wheel of Fortune", "see your psychologist", "talk to your plants", "pet piglet", "clean your apartment", "think about financial concerns", "discuss life with RMS", "marry the milkperson", "adjust your girdle", "tune your stereo", "tune your car", "lift weights", "paint", "draw", "play Sam and Max Hit the Road", "play Car Bomb", "use strict\;" ); @{$horoscope{'verb'}} = ( "become pregnant", "eat holes in your carpet", "piss on the bed", "eat watermelon", "sell your house", "give away your ${$horoscope{'relationship'}}[rand @{$horoscop +e{'relationship'}}] to ${$horoscope{'evilpeople'}}[rand @{$horoscope{ +'evilpeople'}}]", "talk to piglet", "get a ${$horoscope{'noun'}}[rand @{$horoscope{'noun'}}]", "have financial problems", "adjust your girdle", "sit quietly", "sleep", "drive", "put money in the bank", "play games" ); @{$horoscope{'discovery'}} = ( "you are married", "you have two left feet", "Nazi Germany is your country of birth", "you do not have a pet", "several Conspiracy members are following you", "the wives are catching colds", "your ${$horoscope{'relationship'}}[rand @{$horoscope{'relatio +nship'}}] is confused", "your ${$horoscope{'relationship'}}[rand @{$horoscope{'relatio +nship'}}] is an alien", "you lost your piglet", "someone thinks of you as Liza Minelli", "you are Madonna's child", "your long-lost brother is lost", "${$horoscope{'evilpeople'}}[rand @{$horoscope{'evilpeople'}}] + are abusing your ${$horoscope{'noun'}}[rand @{$horoscope{'noun'}}]", "your ${$horoscope{'relationship'}}[rand @{$horoscope{'relatio +nship'}}] was responsible for the overthrow of Communist Russia", "your ${$horoscope{'relationship'}}[rand @{$horoscope{'relatio +nship'}}] is a ${$horoscope{'evilperson'}}[rand @{$horoscope{'evilper +son'}}]", "you're originally from ${$horoscope{'planet'}}[rand @{$horosc +ope{'planet'}}]", "using a ${$horoscope{'noun'}}[rand @{$horoscope{'noun'}}] as +a sex toy is ${$horoscope{'value'}}[rand @{$horoscope{'value'}}]" ); @{$horoscope{'change'}} = ( "fluctuating", "changing", "turning ${$horoscope{'color'}}[rand @{$horoscope{'color'}}]", "turning", ${$horoscope{'color'}}[rand @{$horoscope{'color'}}] ); @{$horoscope{'when'}} = ( "soon", "eventually", "later", "never", "someday", "often", "fall into a state of ${$horoscope{'statenoun'}}[rand @{$horos +cope{'statenoun'}}] but eventually", "sometimes", "perhaps in a few ${$horoscope{'time'}}[rand @{$horoscope{'tim +e'}}]", "once in a while" ); @{$horoscope{'event'}} = ( "a party", "a gathering of some sort", "a social reception", "an intimate office party", "your ${$horoscope{'relationship'}}[rand @{$horoscope{'relatio +nship'}}]'s wedding", "${$horoscope{'evilperson'}}[rand @{$horoscope{'evilperson'}}] +\'s trial", "a bad frat party", "Underwear City", "at the phlebotomist's" ); @{$horoscope{'person'}} = ( "a stranger", "a friend", "your " . ${$horoscope{'relationship'}}[rand @{$horoscope{'relati +onship'}}], "someone you ${$horoscope{'greeted'}}[rand @{$horoscope{'greeted' +}}] ${$horoscope{'times'}}[rand @{$horoscope{'times'}}] at ${$horosco +pe{'event'}}[rand @{$horoscope{'event'}}]", "your ${$horoscope{'animal'}}[rand @{$horoscope{'animal'}}]", "your teddy bear", "your mom", "the mailman", "the man", "your wonderful pet ${$horoscope{'animal'}}[rand @{$horoscope{'an +imal'}}]", "your child", "your spouse", "God", "a wallflower", "a lout", "a warmonger", "two other people put together", "someone you know", "vroom", "merlyn", "Larry Wall" ); @{$horoscope{'try'}} = ( "attempted lightly", "tried without the advice of a doctor", "considered unusual", "done under the influence of alcohol", "achieved with the help of ZenIRC", "done while wearing a girdle", "stared at", "questioned by ${$horoscope{'person'}}[rand @{$horoscope{'pers +on'}}]", "performed by a ${$horoscope{'relationship'}}[rand @{$horoscop +e{'relationship'}}]", "shown on TV", "demonstrated", "shown to small children" ); @{$horoscope{'bullshit'}} = ( "As ${$horoscope{'planet'}}[rand @{$horoscope{'planet'}}] move +s into ${$horoscope{'zodplace'}}[rand @{$horoscope{'zodplace'}}] be c +areful of your relationship with your ${$horoscope{'relationship'}}[r +and @{$horoscope{'relationship'}}]", "You will be in conflict with ${$horoscope{'zodiac'}}[rand @{$ +horoscope{'zodiac'}}] since ${$horoscope{'planet'}}[rand @{$horoscope +{'planet'}}] has moved into ${$horoscope{'zodiac'}}[rand @{$horoscope +{'zodiac'}}]" ); @{$horoscope{'sentence0'}} = ( ucfirst "${$horoscope{'person'}}[rand @{$horoscope{'person'}}] will + ${$horoscope{'personverb'}}[rand @{$horoscope{'personverb'}}] ${$hor +oscope{'attime'}}[rand @{$horoscope{'attime'}}]", ucfirst "${$horoscope{'attime'}}[rand @{$horoscope{'attime'}}] is n +ot a good time for ${$horoscope{'action'}}[rand @{$horoscope{'action' +}}]", "Your ${$horoscope{'noun'}}[rand @{$horoscope{'noun'}}] will ${$hor +oscope{'verb'}}[rand @{$horoscope{'verb'}}] soon", ucfirst "${$horoscope{'thing'}}[rand @{$horoscope{'thing'}}] is not + in the air", "You will discover that ${$horoscope{'discovery'}}[rand @{$horoscop +e{'discovery'}}]", ucfirst "${$horoscope{'attime'}}[rand @{$horoscope{'attime'}}] will + be a good time for ${$horoscope{'action'}}[rand @{$horoscope{'action +'}}]", "Be sure to ${$horoscope{'verb'}}[rand @{$horoscope{'verb'}}] befor +e you find out that ${$horoscope{'discovery'}}[rand @{$horoscope{'dis +covery'}}]", "Your programs will start ${$horoscope{'action'}}[rand @{$horoscope +{'action'}}]", "Look for ${$horoscope{'person'}}[rand @{$horoscope{'person'}}] wit +h one eye", "Don't let ${$horoscope{'person'}}[rand @{$horoscope{'person'}}] ${ +$horoscope{'dothing'}}[rand @{$horoscope{'dothing'}}] with your ${$ho +roscope{'noun'}}[rand @{$horoscope{'noun'}}]", "Listen to your ${$horoscope{'noun'}}[rand @{$horoscope{'noun'}}] $ +{$horoscope{'attime'}}[rand @{$horoscope{'attime'}}]", "Your ${$horoscope{'noun'}}[rand @{$horoscope{'noun'}}] will be ${$ +horoscope{'change'}}[rand @{$horoscope{'change'}}] in the next ${$hor +oscope{'vaguenumber'}}[rand @{$horoscope{'vaguenumber'}}] ${$horoscop +e{'time'}}[rand @{$horoscope{'time'}}]", ucfirst "${$horoscope{'thingstodo'}}[rand @{$horoscope{'thingstodo' +}}]", "You might want to consider ${$horoscope{'action'}}[rand @{$horosco +pe{'action'}}]", ucfirst "${$horoscope{'time'}}[rand @{$horoscope{'time'}}] from now + ${$horoscope{'action'}}[rand @{$horoscope{'action'}}] may seem ${$ho +roscope{'likevalue'}}[rand @{$horoscope{'likevalue'}}]", "Do not ${$horoscope{'verb'}}[rand @{$horoscope{'verb'}}] ${$horosc +ope{'attime'}}[rand @{$horoscope{'attime'}}]", ucfirst "${$horoscope{'person'}}[rand @{$horoscope{'person'}}] ${$h +oroscope{'adjective'}}[rand @{$horoscope{'adjective'}}] ${$horoscope{ +'relationship'}}[rand @{$horoscope{'relationship'}}]", ucfirst "${$horoscope{'attime'}}[rand @{$horoscope{'attime'}}] ${$h +oroscope{'person'}}[rand @{$horoscope{'person'}}] ${$horoscope{'thing +stodo'}}[rand @{$horoscope{'thingstodo'}}]", "Don\'t ${$horoscope{'thingstodo'}}[rand @{$horoscope{'thingstodo'} +}] ${$horoscope{'attime'}}[rand @{$horoscope{'attime'}}]", "Put your ${$horoscope{'noun'}}[rand @{$horoscope{'noun'}}] on hold + ${$horoscope{'attime'}}[rand @{$horoscope{'attime'}}]", "Loaning money to your ${$horoscope{'relationship'}}[rand @{$horosc +ope{'relationship'}}] will bring dividends", ${$horoscope{'bullshit'}}[rand @{$horoscope{'bullshit'}}] ); @{$horoscope{'sentence1'}} = ( ucfirst "${$horoscope{'person'}}[rand @{$horoscope{'person'}}] will + eventually reveal itself to be ${$horoscope{'person'}}[rand @{$horos +cope{'person'}}]", "Your efforts at ${$horoscope{'action'}}[rand @{$horoscope{'action' +}}] turn out to be ${$horoscope{'value'}}[rand @{$horoscope{'value'}} +]", "Many people will ask you for advice about ${$horoscope{'action'}}[ +rand @{$horoscope{'action'}}]", ucfirst "${$horoscope{'person'}}[rand @{$horoscope{'person'}}] will + think of you as ${$horoscope{'person'}}[rand @{$horoscope{'person'}} +]", "Beware of ${$horoscope{'person'}}[rand @{$horoscope{'person'}}] be +aring ${$horoscope{'thing'}}[rand @{$horoscope{'thing'}}]", "Loving your ${$horoscope{'noun'}}[rand @{$horoscope{'noun'}}] now +will turn out to be ${$horoscope{'value'}}[rand @{$horoscope{'value'} +}] after a few ${$horoscope{'time'}}[rand @{$horoscope{'time'}}]", "Don't forget to ${$horoscope{'thingstodo'}}[rand @{$horoscope{'thi +ngstodo'}}]", ucfirst "${$horoscope{'thingstodo'}}[rand @{$horoscope{'thingstodo' +}}] with the help of ${$horoscope{'person'}}[rand @{$horoscope{'perso +n'}}]", "Never ${$horoscope{'thingstodo'}}[rand @{$horoscope{'thingstodo'}} +] without ${$horoscope{'action'}}[rand @{$horoscope{'action'}}] first +", "Do something nice for ${$horoscope{'person'}}[rand @{$horoscope{'p +erson'}}] ${$horoscope{'attime'}}[rand @{$horoscope{'attime'}}]", "You will meet ${$horoscope{'person'}}[rand @{$horoscope{'person'}} +] this week", "Your ${$horoscope{'noun'}}[rand @{$horoscope{'noun'}}] will need t +o be thing${$horoscope{'verb'}}[rand @{$horoscope{'verb'}}] ${$horosc +ope{'attime'}}[rand @{$horoscope{'attime'}}]", ucfirst "${$horoscope{'evilpeople'}}[rand @{$horoscope{'evilpeople' +}}] will ${$horoscope{'verb'}}[rand @{$horoscope{'verb'}}] ${$horosco +pe{'attime'}}[rand @{$horoscope{'attime'}}]", ucfirst "${$horoscope{'attime'}}[rand @{$horoscope{'attime'}}] ${$h +oroscope{'thing'}}[rand @{$horoscope{'thing'}}] would be a good thing + to ${$horoscope{'consider'}}[rand @{$horoscope{'consider'}}]", "Stealing a ${$horoscope{'noun'}}[rand @{$horoscope{'noun'}}] shoul +d not be ${$horoscope{'try'}}[rand @{$horoscope{'try'}}]", "Your finances will become ${$horoscope{'moneystates'}}[rand @{$hor +oscope{'moneystates'}}] in the next several ${$horoscope{'time'}}[ran +d @{$horoscope{'time'}}]", ${$horoscope{'bullshit'}}[rand @{$horoscope{'bullshit'}}] ); @{$horoscope{'paragraph'}} = ( "${$horoscope{'sentence0'}}[rand @{$horoscope{'sentence0'}}] +. ${$horoscope{'sentence1'}}[rand @{$horoscope{'sentence1'}}]. ${$hor +oscope{'sentence0'}}[rand @{$horoscope{'sentence0'}}]\. ${$horoscope{ +'sentence1'}}[rand @{$horoscope{'sentence1'}}]. You'll ${$horoscope{' +when'}}[rand @{$horoscope{'when'}}] be ${$horoscope{'state'}}[rand @{ +$horoscope{'state'}}]. ${$horoscope{'luckynum'}}[rand @{$horoscope{'l +uckynum'}}].", "${$horoscope{'sentence0'}}[rand @{$horoscope{'sentence0'}}] +. ${$horoscope{'sentence1'}}[rand @{$horoscope{'sentence1'}}]. ${$hor +oscope{'sentence1'}}[rand @{$horoscope{'sentence1'}}]. You'll ${$horo +scope{'when'}}[rand @{$horoscope{'when'}}] be ${$horoscope{'state'}}[ +rand @{$horoscope{'state'}}].", "${$horoscope{'sentence1'}}[rand @{$horoscope{'sentence1'}}] +. ${$horoscope{'sentence0'}}[rand @{$horoscope{'sentence0'}}]. ${$hor +oscope{'sentence0'}}[rand @{$horoscope{'sentence0'}}]. ${$horoscope{' +sentence1'}}[rand @{$horoscope{'sentence1'}}]. You'll ${$horoscope{'w +hen'}}[rand @{$horoscope{'when'}}] be ${$horoscope{'state'}}[rand @{$ +horoscope{'state'}}]." ); do { foreach my $foo ( sort keys %horoscope ) { print "$foo: " , scalar ( @{$horoscope{$foo}} ) , "\n"; foreach my $bar ( sort @{$horoscope{$foo}} ) { print "\t$bar\n"; } } } if $ARGV[0] && $ARGV[0] =~ /d/; print "\n${$horoscope{'paragraph'}}[rand @{$horoscope{'paragraph'}}]\n +\n"; =pod =head1 BUGS B<horoscope> suffers from no known bugs at this time. But I'm not too pleased with the wacky randomization I krufted. Believed to work on Windows NT, Windows 2K, Solaris, Linux, and NetBSD +. =head1 STANDARDS Ask the "Psychic Friends Network". =head1 REVISION HISTORY horoscope Revision 1.0 2001/08/13 11:34:03 idnopheq Initial revision =head1 AUTHOR The Perl implementation of B<horoscope> was written by Dexter Coffin, I<>. =head1 COPYRIGHT and LICENSE =head1 SEE ALSO =head1 NEXT TOPIC =for html =cut

In reply to horoscope by idnopheq

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (4)
    As of 2018-10-20 00:39 GMT
    Find Nodes?
      Voting Booth?
      When I need money for a bigger acquisition, I usually ...

      Results (111 votes). Check out past polls.

      • (Sep 10, 2018 at 22:53 UTC) Welcome new users!