#!/usr/bin/perl##生成包含以下内容的index.html文件#链接到目录中的每个文件#该位置(哈克…需要找到一种解决方法)#$location=“/home/arkane/scripts/ls2html.pl”;$location=$0;#标题上使用的字体大小(标题,如“可用文件”)$headerfontsize=4;#被分析的文件具有以下扩展名@文件=<*>;#每个分析目录中写入的默认html文件$html=“index.html”;#用于子目录列表的数组@目录;foreach$列表(<*>){if(-d$listing){推送(@directories,$listing);print(“标题到$listing\n”);系统(“cd$listing&&exec$location”);}}#打开HTML文件进行写入open(FILE,“>$html”)||die“无法打开文件:$!\n”;选择(文件);#启动HTML文件打印(“\n个\n”);打印(“Simon Plouffe文件\n”);#打印(““.`pwd`。”\n”);打印(“\n个");open_table(“100”);打印(“\n个\n”);打印(“完整列表
\n“);打印(“\n个\n”);打印(“\n个\n”);打印(“可用子目录

\n”);打印(“\n”);打印(“\n”);打印(“\n”);open_table(“100”);打印(“\n”);#子目录列表表迭代的设置计数器$count=0;foreach$子目录(@directories){$count++;打印(“\n”);打印(“$子目录
\n”);打印(“\n”);如果($count==3){打印(“\n个\n”);$count=0;}}打印(“\n”);打印(“\n”);打印(“\n”);open_table(“100”);打印(“\n个\n”);打印(“
\n个\n个\n”);打印(“\n个\n”);打印(“可用文件\n”);打印(“\n个\n”);打印(“\n”);打印(“\n”);open_table(“100”);打印(“\n”);#遍历列出的文件,每个文件都有href'ing$countagain=0;foreach(@files){$temp1=$_;$countagain++;打印(“\n”);#防止正在编写的index.html出现如果(!/index.html/){打印(“$温度1\n”);}#使用ogginfo从OGG文件中提取信息#在文件列表下面显示打印(“\n”);if($countagain==2){打印(“\n个\n”);$countagain=0;}}打印(“\n“);打印(“\n”);打印(“");credits();关闭(文件);次级学分{打印(“


\n”);print(“使用ls2html Perl脚本自动创建
\n”);print(“…并由Simon Plouffe修改”);print(“脚本在GNU公共许可证(GPL)下分发”);打印(“
\n”);打印(“\n个\n”);}子open_table{my($mywidth)=@_;打印(“\n”);打印(“\n”);}