in reply to Turn list of files from directory into hyperlink

The canonical way to generate links is to use the "a" (anchor) function of the CGI module:
use CGI qw/:standard /; use File::Basename; my @links = map { a( {-href=>$_}, fileparse($_)[0] ) } @files;
Then , if you want to print the links in an html table, CGI provides the perlish way to do that:
print table({-border=>undef}, caption('List of files on this server'), map ({ Tr({-align=>'CENTER',-valign=>'TOP'}, td($_)) } @links ) ), "\n";

             "I'm fairly sure if they took porn off the Internet, there'd only be one website left, and it'd be called 'Bring Back the Porn!'"
        -- Dr. Cox, Scrubs