Hi All: This is a convoluted problem and I hope I can describe it properly.
I have about 90 html pages. I am extracting a small amount of information from each page and using that to create 90 more pages elsewhere in the site. What is happening is that I'm getting the information, assembling it correctly and putting it out to the new file. However, randomly, I'm getting information repeated in the new file that I cleared. The result is a new file that is 900+KB instead of the intended 10KB. An almost identical structure in another sub-routine works perfectly. Thanks for the help. Here's the code that I'm using: #================ start update CSS sub-menus ========================== sub assemblecsssubmenus { opendir(PROPFILES,"$basedir/properties\-list"); @dirlist = readdir(PROPFILES); closedir(PROPFILES); splice (@dirlist,0,2); foreach $inproplist (sort @dirlist) { if (-d $inproplist) {} elsif ($inproplist =~ /\.htm/) { print "$inproplist \n"; open (INPROPLISTS, "<$basedir/properties\-list/$inproplist"); @indetail = <INPROPLISTS>; close (INPROPLISTS); for ($w=0; $w<=$#indetail; $w++) { if ($indetail[$w] =~ m|^<!-- start property (.*?): -->|i) {$propname = $1; $indetail[$w+1] =~ /id="(.*?)"/; $target = $1; $outmenuprop1 = "<span class=\"alpha1\"><img src=\"indent.gif\" height=\"0\" width=\"10\"><a href=\"../../properties-list/$propname.htm#$target\" target=\"right\">$propname:</a><br></span>\n"; push @outmenuprop, $outmenuprop1; undef $outmenuprop1; print "."; } elsif ($indetail[$w] =~ m|^<!-- start value $propname: (.*?) -->|i) {$valname = $1; $indetail[$w+1] =~ /id="(.*?)"/; $target = $1; $outmenuprop1 = "\t<span class=\"alpha2\"><img src=\"indent.gif\" height=\"0\" width=\"26\"><a href=\"../../properties-list/$propname.htm#$target\" target=\"right\">$valname </a><br></span>\n"; push @outmenuprop, $outmenuprop1; undef $outmenuprop1; print "."; } elsif ($indetail[$w] =~ m|^<!-- start copyright -->|i) {} } @outmenu = split /\z/, <<"endpmenu"; <html>\z <head>\z <title>$propname properties and values menu - htmlcompendium.org</title>\z <!-- start meta load -->\z <meta name="description" content="a description of the $propname properties and values.">\z <meta name="keywords" content="Cascading Style Sheets, CSS, documentation, reference, manual, examples, properties, values, tips, tricks, HTML">\z <meta name="rating" content="general">\z <meta name="author" content="Ronald F. Woodall">\z <meta name="copyright" content="Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 by Ronald F. Woodall, Oxford-on-Rideau, Canada">\z <meta http-equiv="reply-to" content="nor\@htmlcompendium.org%20(compendium%20comments)">\z <!-- end meta load -->\z <!-- start style load -->\z <link rel="stylesheet" type="text/css" href="menucomp900.css" title="0comp700">\z <!-- end style load -->\z </head>\z <body bgcolor="#ffffff" text="#000000" link="#8a8a8a" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" title="Resize this window and/or use the scroll bar to view the entire properties/values list!">\z endpmenu push @outmenu, @outmenuprop; undef @outmenuprop; $outmenu1 = "<\/body>\n<\/html>\n"; push @outmenu, $outmenu1; undef $outmenu1; open (OUTPROPMENU, ">$basedir/Menus/properties/$inproplist"); print OUTPROPMENU @outmenu; close (OUTPROPMENU); print "\n\@outmenu count is: $#outmenu -- "; undef @outmenu; print "\@outmenu count is: $#outmenu\n"; undef $propname; $menucounter++; undef @indetail; } } $historyline = "$menucounter CSS menus were created\n"; open (HISTORY, ">>$dirname/$version/000history.txt"); print HISTORY $historyline; close (HISTORY); undef $historyline; undef $menucounter; } --------------------------------------- Ron Woodall [EMAIL PROTECTED] The Compendium of HTML Elements "your essential web publishing resource" - available at/disponible à: http://au.htmlcompendium.org/index.htm (Australia) http://www.htmlcompendium.org/index.htm (Europe and North America) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]