#!/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'],
'texmex' => ['mission burrito','berryhill', 'canyon cafe']); print "Hi, who is this?\n:"; chomp($name = ); #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 to.\n"; print "Pick one of the following: \n"; print "Chinese, Italian, Eclectic, Mediterranean, American, or TexMex.\n"; chomp($c_choice = ); $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 windows98. sigh. ; } else{ print "You are not Will! Go away!\n"; }