Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Food!

by bratling (Initiate)
on Apr 20, 2000 at 20:43 UTC ( [id://8190]=CUFP: print w/replies, xml ) Need Help??

My friend Will can never decide where to go for dinner. So out of frustration, I threw this together one night so we could spend less than 4-5 hours discussing where we were going for food!

Anyhow, our other friends are using it now, and I have a quickly growing list of requested features from them.

#!/usr/bin/perl -w #the whole purpose of this now-constantly evolving script to #handle my friend's inabilities to pick a restaurant #suggestions for further improvements are always welcome. %cuisines =( 'chinese' => ['hunan', 'general joes', 'feng ling', 'chinese cafe' +], 'italian' => ['napoli', 'star pizza', 'crostini'], 'eclectic' => ['hobbit cafe','baba yega', 'brasil'], 'mediterranean' => ["niko niko\'s",'cafe lili', 'cedars'], 'american' => ['outback', "guggenheim\'s", 'goode company bbq', 'cheesecake factory'],<br> 'texmex' => ['mission burrito','berryhill', 'canyon cafe']); print "Hi, who is this?\n:"; chomp($name = <STDIN>); #will went in and adding the srand part...and a lot of #white space for some reason.... if ($name =~ /^will\b/i) { print "Okay, Time to choose where to go for dinner.\n"; print "The following will provide a random restaurant name to go t +o.\n"; print "Pick one of the following: \n"; print "Chinese, Italian, Eclectic, Mediterranean, American, or Tex +Mex.\n"; chomp($c_choice = <STDIN>); $c_choice =~ tr/[A-Z]/[a-z]/; srand; print $cuisines{$c_choice}->[int(rand @{$cuisines{$c_choice}})], "\n"; #the extra stdin is to keep the script window open under windo +ws98. sigh. <STDIN>; } else{ print "You are not Will! Go away!\n"; }

Replies are listed 'Best First'.
RE: Food!
by Anonymous Monk on Apr 25, 2000 at 02:29 UTC
    What? No 'Chuy's' under texmex?
RE: Food!
by djw (Vicar) on Jun 06, 2000 at 23:48 UTC
    hahaha this rocks. I wrote the same thing for lunch a little while ago. Check it out at my page. woo djw
RE: Food!
by Simplicus (Monk) on Apr 22, 2000 at 22:36 UTC
    I'll have to use this when my wife and I are tyring to decide where to eat.
    Simplicus
RE: Food!
by djw (Vicar) on Jun 06, 2000 at 23:48 UTC
    hahaha this rocks. I wrote the same thing for lunch a little while ago. Check it out at my page. woo djw
RE: Food!
by Shendal (Hermit) on Jun 07, 2000 at 01:09 UTC
    Great script. The best thing about it is that I can take it unedited, since you obviously live in Houston. Montrose area, I presume? I agree with an earlier comment, as well, Chuy's belongs in TexMex. Perhaps even Adobe Cafe?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: CUFP [id://8190]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2025-11-18 01:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (72 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.