#!/usr/bin/perl # # $file_sem= "./seminar.txt" ; $DEDSdir = "/people/faculty/ho/DEDS"; $success = 0; $cnt = 0; @day = (); @mon = (); @year = (); @hour = (); @min = (); @ampm = (); @place = (); @topic = (); @spkr = (); @stat = (); if(!open( SEM, $file_sem )) { print "Content-type: text/html\n\n" ; print <

Sorry, seminar schedules are not available!

EOE # print "Failed to open $file_sem"; } else { while () { next if ( /^$/ || /^\#/ ); # Ignore blank and comment lines if ( /(\d\d)\/(\d\d)\/(\d\d\d\d)-(\d\d):(\d\d)([AP]M)\s\|\s(.+)\s\|\s(.+)\s\|\s(.+)\s\|\s(.+)/ ) { $mon[$cnt] = $1; $day[$cnt] = $2; $year[$cnt] = $3; $hour[$cnt] = $4; $min[$cnt] = $5; $ampm[$cnt] = $6; $place[$cnt] = $7; $topic[$cnt] = $8; $spkr[$cnt] = $9; $stat[$cnt] = $10; $cnt ++; $success = 1; } else { print STDERR "Invalid line $. of $file_sem\n"; next; } } close SEM; } exit(1) if($success == 0); #To register DEDS seminar please click here. print "Content-type: text/html\n\n" ; print < Seminar Schedule

SEMINAR SCHEDULE

 

EO1 for($ii=$cnt-1; $ii>=0; $ii--) { next if ($stat[$ii] eq "D"); print "\n"; if ($stat[$ii] eq "N") { print "\n"; } else { print "\n"; } print "\n"; if ($topic[$ii] eq " " ) { print "\n"; } else { print "\n"; } print "\n"; print "\n"; print "\n"; } print <  
  EO3
Time Place Topic Speaker
$mon[$ii]/$day[$ii]/$year[$ii]-$hour[$ii]:$min[$ii]$ampm[$ii]$mon[$ii]/$day[$ii]/$year[$ii]-$hour[$ii]:$min[$ii]$ampm[$ii]$place[$ii] $topic[$ii]$spkr[$ii]