#!/usr/local/bin/perl -w ### ### generateurltable.lc ### ### This is given a filename which has a number of tab separated ### fields. This is written to the output stream as a table ### of table elements. If there are things which look like ### email addresses, URLs, or image references, they are turned ### into the corrosponding HTML. ### ### This is basically a superset of the generatetable.lc file. ### ### This file should either be in the local directory, or one of ### the system wide webc include directories. ### ### Usage: ### #localcode generateurltable.lc ### #define _TABLE-PARAMS_ border=2 # Optional ### #call GenerateURLTable filename ### ### Dave Regan ### 2 March 2001 ### regan@ao.com ### use strict; use vars qw(%CallFuncs $GenerateURLTableVersion); $GenerateURLTableVersion = 'generateurltable.lc v0.00 regan@ao.com'; ### ### GenerateURLTable ### sub GenerateURLTable { my($fname) = @_; my($field, @fields, $params); if (!open(FILE, "<$fname")) { print STDERR "Cannot open table file $fname: $!\n"; return; } $params = $Symbols{'_TABLE-PARAMS_'} || ""; print OUT "
| $field | \n"; } print OUT "