#!/usr/bin/perl use CGI; print "Content-type: text/html\n\n"; $query = new CGI; $people = $query->param('people'); $num = $query->param('num'); $neveromit = $query->param('neveromit'); $samechores = $query->param('samechores'); if (int($num) > 0) { open(FIL,">nchores.txt"); print FIL int($num); close(FIL); } if ($people ne '') { open(FIL,">people.txt"); @personlist = split('\n',$people); foreach $p (@personlist) { $p =~ s/(\n|\r)//g; if ($p ne '') { print FIL "$p\r\n"; } } print FIL "\|"; close(FIL); } if ($samechores ne '') { open(FIL,">samechores.txt"); @personlist = split('\n',$samechores); foreach $p (@personlist) { $p =~ s/(\n|\r)//g; if ($p ne '') { print FIL "$p\r\n"; } } print FIL "\|"; close(FIL); } if ($neveromit ne '') { open(FIL,">noomit.txt"); @noomit = split('\n',$neveromit); foreach $p (@noomit) { $p =~ s/(\n|\r)//g; if ($p ne '') { print FIL "$p\r\n"; } } close(FIL); } open(FIL,"people.txt"); #open a list of people that should be on the chores list @FIL = ; close(FIL); open(FIL,"noomit.txt"); #open a list of chores that may NOT be omitted on any given day @noomit = ; close(FIL); open(FIL,"nchores.txt"); #find out how many total chores we need $nchores = int(); close(FIL); open(FIL,"samechores.txt"); #find out how many total chores we need $samechores = ; close(FIL); $people = join('',@FIL); chop($people); chomp($people); $neveromit = join('',@noomit); chomp($neveromit); print <Update Chores List
People that get random chores:

Randomized chore numbers that are never omitted:

Number of chores for randomization:
People that get the same chore all week. 1 person per line, place a comma between the person and the chore number they should get:

EOHTML