Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I do not know perl and have been trying to work on this for almost a week now. If anyone could help I would appreciate it. Thanks in advance.#!/usr/bin/perl -w sub Get_Title { my =shift; unless(-f "") { return("NO INDEX"); } open(HTML,"<"); while(<HTML>){ if(sh=~ /<title>(.*)<\/title>/i) { close HTML; return ""; } } close HTML; return "Untitled"; } my ="/usr/local/apache/htdocs/projects/"; my ="http://mattwork.potsdam.edu/projects/"; opendir(PRJD,""); my @dirs=readdir PRJD; closedir(PRJD); print "Content-Type: text/html\n\n"; print "<html><head><title>Project Index Page</title></head><body>\n"; for(@dirs) { if(sh=~ /^\./) { next; } unless(-d sh) { next; } my ="sh/index.html"; my =Get_Title(""); =~ s///i; print "<a href=\ "\ "></a>\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dynamic Directory Index help
by davido (Cardinal) on Oct 07, 2004 at 02:43 UTC | |
by Anonymous Monk on Oct 07, 2004 at 03:00 UTC | |
by tachyon (Chancellor) on Oct 07, 2004 at 03:24 UTC | |
by davido (Cardinal) on Oct 07, 2004 at 15:56 UTC | |
|
Re: Dynamic Directory Index help
by bart (Canon) on Oct 07, 2004 at 05:39 UTC | |
|
Re: Dynamic Directory Index help
by krujos (Curate) on Oct 07, 2004 at 02:35 UTC | |
by Anonymous Monk on Oct 07, 2004 at 02:42 UTC |