Enjoy the insight normally reserved only for Santa and his elves. Happy Holidays!
my(@g,@b);while(my$l=<DATA>){chomp$l;my@s=split/\|/,$l;for(@s){my$ty= chop;tr/a-zA-Z/n-za-mN-ZA-M/;my$r_a=($ty=~/G/i)?\@g:\@b;push@{$r_a},$ _}}GIFT_GIVING:{print"--- Santa's List Reader ---\nSanta, enter chi", "ld's name, or [Quit] to quit.\n";;my$n="";;;until("All gifts are"=~/ given/x){$n=<STDIN>;chomp$n;last if$n=~/^Quit/i;my($h,$f)=(length($n) %2>0)?("good",$g[rand(@g)]):("bad",$b[rand(@b)]);print"$n was $h th", "is year. Give $f.\n\n\n\nEnter child's name, Santa, or [Quit] to ", "quit.\n"}unless("Grinch"=~/Stole Christmas/){print"\n\n\n\nSanta, ", "you can't quit yet; kids need their toys.\n\n";redo GIFT_GIVING}} __DATA__ Cynl FgngvbaG|FpbbgreG|QbyyG|Creyzbaxf GfuegG|Fuval arj abgrobbxG jbeyq crnprG|Wnpxvr Puna IvqrbG|GevplpyrG|Sver RatvarG|ChcclG Ebggra CbgngbB|Qbt cbbcB|-- ibgrfB|gur syhB|yhzc bs pbnyB|jbezfB ebggra rttfB|ohpxrg bs ibzvgB|Wnpxvr Puna IvqrbB
This one isn't about "figuring it out". Just have fun. Merry Christmas everyone. :)
Dave
In reply to He's Making a List, Checking it Twice... by davido
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |