#! /usr/local/bin/perl
#################################
#
# WeddingPlanner CGI
#
# Written by Zach Whalen --
# (zwhalen@english.ufl.edu)
#
# Please contact me if you use this
# program or if you have any questions.
#
# Copyleft Zach Whalen 2003
# You can use this program if
# you want to. Just don't try to
# Copyright it yourself, please.
#
#################################
### SUMMARY ###
#
# This is part of a script which helps you
# keep up with addresses and other related
# information when you're planning a wedding
# (or conference).
#
alarm(30);
use strict;
print "Content-type: text/html \n\n";
require '/web/nwe/share/nwe.pm';
my @datfiles = glob "*.dat";
my @Sorted = sort (@datfiles);
my $Total = 0;
my @Array;
foreach (@Sorted) {
my %hash = &make_hash($_);
push @Array, $hash{group};
}
my $Total = &Total(@Array);
my @Entries;
foreach (@Sorted) {
my %hash = &make_hash($_);
push @Entries, 1;
}
my $entries = &Total(@Entries);
my @invitations_sent;
foreach (@Sorted) {
my %hash = &make_hash($_);
if ($hash{invite}){
push @invitations_sent, 1;
}else{
next;
}
}
my $sent = &Total(@invitations_sent);
my @Party;
foreach (@Sorted) {
my %hash = &make_hash($_);
push @Party, $hash{party};
}
my $invited = &Total(@Party);
my @RSVPS;
foreach (@Sorted) {
my %hash = &make_hash($_);
if ($hash{RSVP}){
push @RSVPS, 1;
}else{
next;
}
}
my $rsvps = &Total(@RSVPS);
print <These are all the files you've entered so
far:
|
View just the addresses to make mailing labels. Print all of the email addresses so you can cut and paste them. |
So far, $Total people have said they are coming!
| ||||||||||||||||||||||||||||||||||||||||||||||