in reply to A "landing page" or "microsite" for my LAN - running Apache
The whole point of this site is to help you to learn to program in Perl. That means you have to try things out. That being said, you can do something like this:
# Make a file called linkable.pl with these contents #!/usr/bin/perl -w my $n = $ARGV[0]; $n=~s{^\.\/}{}; my $path = q~http://www.fooberry.com~; print qq~<a href="$path/$n">$n</a>\n~; 1;
Now you can make a script that does this to make links:
find . -name "*.txt" -exec ./linkable.pl {} \;
Redirect the output to a file. If you have a header in one file and a footer in another you can just append them all to make a single html file. You can make a cron job to run this periodically or utilities exist to help you monitor a directory for changes. I would research using Perl's File::Find module to make a single script to better understand the language.
Celebrate Intellectual Diversity
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A "landing page" or "microsite" for my LAN - running Apache
by Intrepid (Curate) on Dec 22, 2024 at 19:18 UTC |