#!/usr/bin/perl -w use strict; use CGI; $| = 1; # roster-email # roster-pw my $seer = new CGI; print $seer->header("text/html"); print timestampToDate(time); sub timestampToDate { use Time::Local; my $milli_time = shift; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($milli_time); my $day = qw(sunday monday tuesday wednesday thursday friday staurday)[$wday]; my $month = qw(jan feb mar apr may jun jul aug sep oct nov dec)[$mon]; $year += 1900; my $date = sprintf("%s %s %s %s",$day,$mday,$month,$year); return $date; }
norwich [dot] perl mongers
#!/usr/bin/perl -w use strict; use CGI; $| = 1; use LWP::Simple; my $foo = get("http://mail.pm.org/mailman/roster/norwich-pm?roster-email=hoov_pm%40bisfeehd.org.uk&roster-pw=lardgun"); my (@usrs) = $foo =~ m|
  • (.*?)|g; # roster-email # roster-pw my $ct = @usrs; my $seer = new CGI; print $seer->header("text/html"); my $s = "member"; $s .= $ct == 1 ? "" : "s"; print "current membership : $ct";
  •  
    join us
    contact admin
    contact webmaster
    #!/usr/bin/perl -w use strict; use CGI; use Cwd; $| = 1; my $sep = "/"; my $seer = new CGI; my $out; my $cgi_root = cwd; my $web_root = $cgi_root; $web_root =~ s:/cgi.*::i; $cgi_root .= "/cgi-bin" unless $cgi_root =~ m:cgi:i; require "shared_functions.pl"; my $datafile = $ENV{DOCUMENT_ROOT}."/datafiles/meet/meet.d"; my %meetData = readDatafile($datafile); my $date = (keys %meetData)[0]; my $delta = 24*60*60*1000; if ($meetData{$date}{DECIDED} && $meetData{$date}{TIMESTAMP}+$delta >= time) { my $when = timestampToDate($meetData{$date}{TIMESTAMP}); $out = qq | |; } else { $out = qq | |; } print $seer->header("text/html"); print $out;
    latest :#!/usr/bin/perl -w use strict; use CGI; use Cwd; $| = 1; my $sep = "/"; my $cgi_root = cwd; my $web_root = $cgi_root; $web_root =~ s:/cgi.*::i; $cgi_root .= "/cgi-bin" unless $cgi_root =~ m:cgi:i; require "shared_functions.pl"; my $datafile = $ENV{DOCUMENT_ROOT}."/datafiles/announce/announce.d"; my $seer = new CGI; my %announceData = readDatafile($datafile); my $latest = 0; for (keys %announceData) { $latest = $_ if $_ > $latest; } print $seer->header("text/html"); print " last updated ".timestampToDate($latest);
    next meeting : $when next meeting : not yet decided
    miscellany