1. for (;;) { 2. undef $!; 3. unless (defined( $line = <> )) { 4. last if eof; 5. die $! if $!; 6. } 7. # ... 8. } #### #!/usr/bin/perl -w use strict; my $SessionID = $ARGV[0]; # my $infile="\\\\10.0.16.97\\c\$\\web\\Apache-SSL\\logs\\access.log"; my $infile="Input\\access.log"; my $outfile="Output\\$SessionID\.html"; my $plogfile="Output\\$SessionID\-participants-log.html"; my $ologfile="Output\\$SessionID\-observers-log\.html"; my $line; my ($logtime,$starttime,$endtime,$timecheck); my ($FullURL,$ObURL); my ($UserID,$ObserverID); my (@Participants,@Observers); sub TranslateURL; # Changes all URL Escape Codes to regular charecters sub GetUserID; # Gets UserID from FullURL sub GetObserverID; # Gets ObserverID from ObURL sub AddToUserArray; # Checks if this is a new user and adds to user array sub AddToObserverArray; # Checks if this is a new observer and adds to observer array sub AddToUserLog; # Adds a line to the user log with the userid, URL and time. sub AddToObserverLog; # Adds a line to the observer log with the observerid, URL and time. sub ShowupSummary; #################### #Beginning of script #################### $starttime=localtime(); print "Script starting at $starttime\n"; open(IN,"<","$infile") || die "Can't open input file $infile"; $timecheck=localtime(); print "Finished open log file at $timecheck\n"; open(PLOG,">","$plogfile") || die "Can't open participants log file $plogfile"; print PLOG "\\n\\n\