#!/usr/bin/perl use CGI; #Global Configuration Variables for Ftrain.com $work = '/home/ford/sites/ftrain.com/legacy/cgi-bin'; $site_template = "$work/template.inc"; $site_simple_template = "$work/template.inc"; $site_author = 'Paul Ford'; $site_link = q{Ftrain.com}; sub ParseTemplate { my ($page_title, $page_links, $page_text) = (@_); open (PAGE, ") { s/\{\{([^\}]+)\}\}/${$1}/g; print; } close PAGE; } sub ParseSimpleTemplate { my ($page_title, $page_links, $page_text) = (@_); open (PAGE, ") { s/\{\{([^\}]+)\}\}/${$1}/g; print; } close PAGE; } sub ReturnParseTemplate { my $page; my ($page_title, $page_links, $page_text) = (@_); open (PAGE, ") { s/\{\{([^\}]+)\}\}/${$1}/g; $page .= $_; } close PAGE; return $page; } $this_script = "/cgi-bin/l_operation.cgi"; $page_title = "American Military Operation Name Generating Device"; $page_links = qq{$site_link

Language Machines

[$page_title]}; $c = new CGI; @adj = ( 'Aching', 'Ageless', 'Aggravated', 'Angered', 'Angry', 'Spitting', 'Arab-killin\'', 'Awe-inspiring', 'Beaming', 'Bipartisan', 'Bisexual', 'Bitter', 'Black', 'Blind', 'Engorged', 'Bloodthirsty', 'Brave', 'Brutal', 'Burning', 'Burning', 'Bursting', 'Ready-for-CNN', 'Ceaseless', 'Choleric', 'Christian', 'Civilian-devouring', 'Combusting', 'Congested', 'Crazed', 'Dark', 'Delirious', 'Democratic', 'Destructive', 'Don\'t Mess With Our', "Grab Your Ankles and Prepare for Our", 'Durable', 'Culturally Imperialist', 'Endangered', 'Enraged', 'Eternal', 'Evangelical', 'Everlasting', 'Fabled', 'Famous', 'Unflinching', 'Flaming', 'Flaring', 'Flying', 'Frenzied', 'Furious', 'Glowing', 'God-fearing', 'Green', 'Hard', 'Hot Under The Collar', 'Hot', 'Huffy', 'Humane', 'Hungry', 'Hysterical', 'Incensed', 'Incredibly Expensive', 'Indefinable', 'Indestructible', 'Indignant', 'Unindulgent', 'Inflamed', 'Infallible', 'Inflexible', 'Infuriated', 'Innocent', 'International-law-ignoring', 'Irascible', 'Irate', 'Ireful', 'Irreversible', 'Legendary', 'Livid', 'Locked-and-loaded', 'Very Mad', 'Maddened', 'Massive', 'Merciful', 'Merciless', 'Nail-biting', 'Narcoleptic', 'Nerve-wracking', 'Nervous', 'Oil-lusting', 'Outraged', 'Overpriced', 'Oversized', 'Permanent', 'Perpetual', 'Piercing', 'Pious', 'Pissed off', 'Famous', 'High-pressure', 'Hissing', 'Shitting', 'Humping', 'Profitable', 'Provoked', 'Raging', 'Red', 'Regretless', 'Rogueish', 'Rouge-wearing', 'Unleashed', 'Safe', 'Sanctimonious', 'Screaming', 'Selfish', 'Sexually Ambiguous', 'Shining', 'Smoldering', 'Smouldering', 'Sore', 'Long-term', 'Endless', 'Underwear-staining', 'Standing', 'Steadfast', 'Storming', 'Strong', 'Gnashing', 'Temperamental', 'Tempestuous', 'Desert', 'Mountain', 'Ocean', 'Prairie', 'Meadow', 'Tense', 'Thrusting', 'Trigger-happy', 'Turban-burnin\'', 'Umbrageous', 'Clambering', 'Expansive', 'Raw', 'Ceaseless', 'Unexpected', 'Universal', 'Cruel', 'Unknown', 'Merciless', 'Necessary', 'Unpleasant', 'Unpredictable', 'Unproven', 'You May Want to Stand Back From Our', 'It\'s Best to Avoid Our', 'Don\'t Piss off the', 'Prepare to Be Destroyed by Our', 'Expect No Mercy From Our', 'Beware of the', 'Thin-skinned', 'Touchy', 'Nuclear-tipped', 'Punctured', 'Unstinting', 'Venomous', 'Very Hungry', 'Ravenous', 'Parched', 'Wild', 'Medieval', 'Wise', 'World-destroying', 'World-shaking', 'Wrathful', 'Rioting', 'Ejaculating', 'Interjecting', 'Spewing', 'Wraithlike', 'Plunging', 'Midnight', 'Equalizing', 'Bowel-loosening', 'Dangerous', 'Steel', 'Bronze', 'Iron', 'Brass', 'Smite the', 'Destroy the', 'Terrible', 'Awesome', 'Leather', 'Plastic', 'Cold', 'Frontier', 'Cowboy', 'Platinum', 'Silver', 'Ankle-grabbing' ); @noun = ( 'Amphibian', 'Anaconda', 'Arrow', 'Ayatollah', 'Badger', 'Bandicoot', 'Bankers', 'Basilisk', 'Bayonet', 'Bear', 'Beaver', 'Bee', 'Bird of Prey', 'Boyfriend', 'Bull', 'Bullet', 'Butterfly', 'Button', 'Cannon', 'Capitalists', 'Celebrities', 'Centaur', 'Cerberus', 'Cheetah', 'Children', 'Cobra', 'Cockatrice', 'Congress', 'Copperhead Snake', 'Cougar', 'Crocodile', 'Crusade', 'Cyclone', 'Daisy', 'Defense Industry', 'Delirium', 'Democracy', 'Demon', 'Devil', 'Diplomacy', 'Dirk', 'Dragon', 'Dragonfly', 'Eagle', 'Economy', 'Emu', 'Equality', 'Explosion', 'Eyetooth', 'Fiend', 'Fire', 'Fishhook', 'Foreign Policy', 'Free Market', 'Frenzy', 'Gecko', 'Girlfriend', 'Goat', 'God', 'Goddess', 'Gorgon', 'Griffin', 'Grizzly', 'Gunship', 'Hammer', 'Harpoon', 'Hatchet', 'Hawk', 'Hellhound', 'Hellion', 'Hurricane', 'Hydra', 'Iguana', 'Impact', 'Imperialism', 'Incubus', 'Industry', 'Investment Bankers', 'Jack Russell Terrier', 'Jesus', 'Jihad', 'Judgement', 'Jungle Cat', 'Jury', 'Justice', 'Killers', 'Knife Blade', 'Knife', 'Leopard', 'Liberty', 'Lightning', 'Lilac', 'Lion', 'Lividity', 'Loudmouth', 'Lover', 'Lynx', 'Manticore', 'Marsupial', 'Meerkat', 'Middle Class', 'Minister', 'Minotaur', 'Missile', 'Mob', 'Mongoose', 'Monster', 'Muskrat', 'Mutual Fund', 'Mosque', 'Turban', 'Lance', 'Mullah', 'Assassination', 'Infidel', 'Djinn', 'Caliph', 'Hummus', 'Chick Pea', 'Cleric', 'Quran', 'Abraham', 'Ethics', 'Fatwa', 'Hajj', 'Imam', 'Ka\'bah', 'Kitten', 'Kafir', 'Nakba', 'Prophet', 'Sweet Baby Jesus', 'Necktie', 'Needle', 'Ocelot', 'Omar', 'Osama', 'Ogre', 'Oilfield', 'Opossum', 'Otter', 'Owl', 'Panther', 'Peach', 'Pit Bull', 'Polity', 'Pouched Mole', 'Preacher', 'Privet Bush', 'Python', 'Rain of Burning Death', 'Raptor', 'Republican Administration', 'Rocket', 'Rottweiler', 'Saber', 'Scapegoat', 'Senate', 'Serpent', 'Sheikh', 'Shrub', 'Snake', 'Snow Leopard', 'Soldier', 'Squirrel', 'Supernova', 'Storm', 'Strike', 'Sucker Punch', 'Sunrise', 'Sunset', 'Talons', 'Teacher', 'Tension', 'Tiger', 'Toad', 'Tree Frog', 'Troll', 'Typhoon', 'Uniform', 'Vengeance', 'Venom', 'Virgin', 'Vulture', 'Weasel', 'Weather Condition', 'Whip', 'Wizard', 'Wolverine', 'Wombat', 'Wraith' ); print $c->header; $num_ops = $c->param('num_ops'); $num_ops = 100 if $num_ops > 100; unless ($num_ops) { $num_ops = 5; } $page_text .= qq{ $num_ops Randomly Generated American Military Operation Names

By Paul Ford, October 2001}; $page_text .= "

"; for (1..$num_ops) { undef $r_noun; undef $r_adj; do {$r_noun = int(rand($#noun))} until !$r_noun_hash{$r_noun}; $r_noun_hash{$r_noun}=1; do {$r_adj = int(rand($#adj))} until !$r_adj_hash{$r_adj}; $r_adj_hash{$r_adj}=1; $page_text .= qq{ Operation $adj[$r_adj] $noun[$r_noun] }; } $page_text .= "

[Again]

More or Less: [5] [10] [15] [20] [50] [100] Names }; ######################################## ParseTemplate();