\n"; $process = 0 ; $place_1 = 0 ; $place_2 = 0 ; $place_3 = 0 ; $place_4 = 0 ; $source_count = 0 ; $target_count = 0 ; $line_count = 0 ; $num_lines = 0 ; while (\n" ; print OUTBFILE ') { chomp $_ ; if ( $process eq 0 ) { if ( $_ !~ /Last Revised/ ) { next } else { ++$process } ; } $in_array [$line_count] = $_ ; while ( $in_array[$line_count] =~ /\s+$/ ) { chop $in_array[$line_count] } ++$line_count ; ++$num_lines ; } for ( $line_index ; $line_index < $num_lines ; $line_index++ ) { $h_index = index ( $in_array[$line_index], "http://", 0 ) ; $full_html = $in_array[$line_index] ; $last_h = 0 ; if ( $full_html =~ /^\s*-\s/ ) { #print "full_html: $full_html" ; $anchor_name = $full_html ; $anchor_name =~ s/[\[\]]//g ; $anchor_name =~ s/[".!,\' :\-?.]//g ; $anchor_name =~ s/\s*$// ; if ( length ( $anchor_name ) < 6 ) { $anchor_name = $anchor_name . "xxxxxx" ; } $anchor_name = substr ( $anchor_name, 0, 6 ) . substr ( $char_list, $place_1, 1 ) . substr ( $char_list, $place_2, 1 ) . substr ( $char_list, $place_3, 1 ) . substr ( $char_list, $place_4, 1 ) ; $hit = 0 ; $test_line = $full_html ; $test_line =~ s/^\s*\-\s*// ; for ( $idx = 0 ; $idx < $variant_count ; $idx++ ) { if ( $test_line eq $srce_var_array[$idx] ) { $source_array[$source_count] = $dest_var_array[$idx] ; $hit = 1 ; } } if ( $hit eq 0 ) { $source_array[$source_count] = $test_line ; } $sce_use_array[$source_count] = 0 ; $sce_line_array[$source_count] = $line_index ; $anchor_name_array[$source_count++] = $anchor_name ; #print ", anchor name: $anchor_name\n" ; ++$place_4 ; if ( $place_4 > 29 ) { $place_4 = 0 ; ++$place_3 ; if ($place_3 > 29 ) { $place_3 = 0 ; ++$place_2 ; if ( $place_2 > 29 ) { $place_2 = 0 ; ++$place_1 ; if ( $place_1 > 29 ) { die "*** Too may anchors.\n Program modification needed to allow more than 810,000 anchors.\n" } } } } } if ( $in_array[$line_index] =~ /^\-\-\-*\s*$/ && $in_array[$line_index+2] =~ /^\-\-\-*\s*$/ || $in_array[$line_index] =~ /^~~~*\s*$/ && $in_array[$line_index+2] =~ /^~~~*\s*$/ ) { $target_array[$target_count] = $in_array[$line_index+1] ; $target_line_array[$target_count] = $line_index + 1 ; while ( $target_array[$target_count] =~ /\s+$/ ) { chop $target_array[$target_count] } #print "target_line_array[$target_count]: $target_line_array[$target_count], " ; #print "target_array[$target_count]: $target_array[$target_count]\n" ; ++$target_count ; } $e_mail_hits = 0 ; while ( $full_html =~ /(<[^>]+@[^>]+>)/g ) { $bracketed_string[$e_mail_hits] = $1 ; ++$e_mail_hits ; } for ( $mail_index = 0 ; $mail_index < $e_mail_hits ; $mail_index++ ) { if ( $bracketed_string[$mail_index] !~ /trio\@euronet.nl/ ) { $e_mail_start = index ( $full_html, $bracketed_string[$mail_index], 0 ) ; $back_start = $e_mail_start + length ($bracketed_string[$mail_index]) ; $front_part = substr ( $full_html, 0, $e_mail_start ) ; $back_part = substr ( $full_html, $back_start ) ; $contents = substr ( $bracketed_string[$mail_index], 1, length ( $bracketed_string[$mail_index]) - 2 ) ; $full_html = $front_part . "<$contents>" . $back_part ; } } $junk_hits = 0 ; while ( $full_html =~ /(<[^>@]*>)/g ) { $bracketed_string[$junk_hits] = $1 ; ++$junk_hits ; } for ( $junk_index = 0 ; $junk_index < $junk_hits ; $junk_index++ ) { if ( $bracketed_string[$junk_index] !~ /^ 0 ) # { print "bracketed_string_array:\n" ; # for ( $print_index = 0 ; $print_index < $e_mail_hits ; $print_index++ ) # { print " $bracketed_string[$print_index]\n" ; } # } while ( $h_index >= 0 ) { if ( $h_index > 0 ) { if ( substr ( $full_html, $h_index - 1, 1 ) eq "<" ) { $g_index = index ( $full_html, ">", $h_index ) ; $url = substr ( $full_html, $h_index, $g_index - $h_index ) ; $front_part = substr ( $full_html, 0, $h_index - 1 ) ; $mid_part = '<' . $url . ">" ; $back_part = substr ( $full_html, $g_index + 1 ) ; $full_html = $front_part . $mid_part . $back_part ; } else { $front_part = substr ( $full_html, 0, $h_index - 1 ) ; $lenurl = length ( $full_html ) - length ( $front_part ) ; $url = substr ( $full_html, $h_index, $lenurl ) ; $back_part = '' . $url . "" ; $full_html = $front_part . $back_part ; } } else { $full_html = '' . $full_html . '' ; } $last_h = $h_index + 2 * length ( $url ) + 18 ; $h_index = index ( $full_html, "http://", $last_h ) ; } $dr_index = index ( $full_html, "Donna Richoux", 0 ) ; if ( $dr_index >= 0 ) { $front_part = substr ( $full_html, 0, $dr_index ) ; $back_part = substr ( $full_html, $dr_index + 13 ) ; $full_html = $front_part . 'Donna Richoux' . $back_part ; } $pass_1_array[$line_index] = $full_html ; } TARGET_LOOP: for ( $target_line = 0 ; $target_line < $target_count ; $target_line++ ) { for ( $source_line = 0 ; $source_line < $source_count ; $source_line++ ) { if ( $sce_use_array[$source_line] ne 0 ) {next} if ( $target_array[$target_line] eq $source_array[$source_line] ) { $sce_use_array[$source_line] = 1 ; $pass_1_array[$target_line_array[$target_line]-1] = $pass_1_array[$target_line_array[$target_line]-1] . "" ; $html_line = $pass_1_array[$sce_line_array[$source_line]] ; $html_line =~ s/(^\s*\-\s*)// ; $html_line = "$1" . $html_line . "" ; $pass_1_array[$sce_line_array[$source_line]] = $html_line ; next TARGET_LOOP ; } } } for ( $line_index = 0 ; $line_index < $num_lines ; $line_index++ ) { print OUTBFILE $pass_1_array[$line_index], "\n" ; } print OUTBFILE "
- - - - - -
', "\n" ;
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = gmtime ( time ) ;
@time_list = ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) ;
@time_list = undef ( @time_list ) ; #This and prev. to make Perl quit complaining about unused variables
if ( $hour < 10 ) { $hour = "0$hour" ; }
if ( $min < 10 ) { $min = "0$min" ; }
if ( $year > 99 )
{ $year -= 100 ;
if ( $year < 10 ) { $year = "0$year" } ;
$year = "20$year" ; }
else
{ if ( $year < 10 ) { $year = "0$year" } ;
$year = "19$year" ;
}
@wday_list = qw ( Sunday Monday Tuesday Wednesday Thursday Friday Saturday ) ;
$wkday = $wday_list [ $wday ] ;
@month_list = qw ( January February March April May June
July August September October November December ) ;
$mon_now = $month_list [ $mon ] ;
print OUTBFILE "Last modification of this hypertext file: ",
"$wkday $mday $mon_now $year $hour:$min GMT
\n" ;
print OUTBFILE '', "\n" ;
print OUTBFILE '', "\n" ;
close OUTBFILE ;
print "Exit?" ;
if (