- or download this
#!/usr/bin/perl
use strict;
use warnings;
- or download this
use CGI;
use CGI::Carp qw(fatalsToBrowser);
- or download this
print "content-type: text/html \n\n";
- or download this
my @Dice = (
roll '1d4',
...
roll '1d20'
);
my @Dice2 = qw(1d4 1d6 1d8 1d10 1d12 1d20);
- or download this
my @Dice = qw(1d4 1d6 1d8 1d10 1d12 1d20);
my @Roll = map { roll($_) } @Dice;
- or download this
my @Radius = (
"1' or Touch",
...
"100'"
);
my $radius = "in a $Radius[rand @Radius] radius";
- or download this
my @Wizard_School = qw(Abjuration Air Alteration Conjuration/Summoning
+ Divination Earth Enchantment/Charm Fire Illusion/Phantasm Invocation
+/Evocation Necromancy Water);
my @Cleric_Sphere = qw(Air All Animal Astral Chaos Charm Combat Creati
+on Divination Earth Fire Guardian Healing Law Necromatic Numbers Plan
+t Protection Summoning Sun Thought Time Travelers War Wards Water Wea
+ther);
...
"rare",
"very rare"
);
- or download this
sub load_array_data {
my ($file, $array) = @_;
...
}
my @Wizard_School;
load_array_data('wizard.data', \@Wizard_School);
- or download this
my @Colors = (
"f00;\">red",
...
"fff;\">white",
"000;\">black"
);
- or download this
my %color = (
blue => 1, green => 2, yellow => 3
red => 4, orange => 5, purple => 6
);
print "The code for green is $color{green}\n";