in reply to Turn list of files from directory into hyperlink
Perhaps the following will be helpful:
use strict; use warnings; use File::Glob qw/:nocase/; use File::Basename; my @htmlFiles = map { my $file = fileparse $_; qq{<a href="$file">$_</ +a><br>\n} } <directory/*.{htm,html}>; print for @htmlFiles;
Sample output:
<a href="67.htm">directory/67.htm</a><br> <a href="5a.html">directory/5a.html</a><br> <a href="a.HTML">directory/a.HTML</a><br>
|
|---|