#!/usr/local/bin/perl foreach $file (<*.htm*>) { open(HTFILE, ">>$file") or die ("can't open $file"); while (<HTFILE>) { chop; $notitle = 1; if (/^\<TITLE\>/) { s/<TITLE>//; s/<\/TITLE>//; print; $notitle = 0; last; # break out of this loop (file) } if (/^\<title\>/) { s/<title>//; s/<\/title>//; print; $notitle = 0; last; # break out of this loop (file) } } if ($notitle == 1) { print "*** No title found *** " }; close(HTFILE); print " ($file)\n"; }
In reply to Rename html page titles by Concept99
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |