In the simple search.cgi from Matt's Script Archive, there is the following
line which extracts the title of the doucment to display in the list of
search results :-
if ($string =~ /<title>(.*<\/title>/i){
$titles{$FILE} = "$1";
}
On the site I'm using the search.cgi on, the files are all .php3s. All the
headers of the documents are dynamic, so the files themselves to not contain
<title> tags in HTML form. Instead, all the document titles are specified in
a variable assignment at the top of the document just before the header is
included, i.e.
<?
// Start of file
$title = "Document Title";
include "header.php3";
?>
blah blah blah
How can I modify the above expression in Perl so that the above $title = "";
variable assignment is matched instead?
Thanks
Jon