#!/usr/bin/perl # Directory indexer. # perl dir_index.pl directory_path 'Title' # # directory_path is required but 'Title' can be ignored and defaults to # "Directory Index page" # 06/01/2003 njc - I needed a program to create directory indexing as Comcast # doesn't permit access to the directories directly. I may add # a description file describing each program (later). # 01/24/2007 njc - I'm now using qq( )qq instead of quote marks also I've added # a bunch of extra details to the css and html to make the # page more closely with the rest of the pages on the Linuxha # site (the new home of my pages). my ($fname, $fsize, $fdate); my ($dir, $name) = @ARGV; my $date = `date '+%A %B %d, %Y'`; defined($dir) || die "Must give directory to switch to.\n"; if(!defined($name)) { $name = "Linux Home Automation File Directory"; } chdir($dir) || die "Can not cd to $dir ($!)\n"; # This needs to be changed to read a file or something so we can hide # certain files a bit better open DIR, "ls -l|"; print "CD to $dir\n"; while(