I got this far, is this ok?
$dir = '/staff/lad/public_html/SWT';
opendir(DIR, $dir) or die "Cannot open directory";
foreach $entry (readdir DIR)
{
print "$entry\n"
}
closedir(DIR);
"Dan Muey" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
com...
There was a post about exactly t
There was a post about exactly this not too long ago. I'd look in the archive.
It used File::Slurp to read the directories and print an html list.
That way it's easy, fast , prortable, you don't' have to worry about parsing the
output of 'ls', etcc.
DMuey
> Hi guys,
>
> Need a perl CGI script
> > Need a perl CGI script that will print to a web page the
> contents of a
> > directory specified in the program. Basically i need the
> > perl program to
> > simply call the unix "ls" function, not sure how to
> > encorporate this into my
> > script though, any ideas?
>
> system() will wor
> Need a perl CGI script that will print to a web page the contents of a
> directory specified in the program. Basically i need the
> perl program to
> simply call the unix "ls" function, not sure how to
> encorporate this into my
> script though, any ideas?
system() will work, however you will
Mebbe something like this?
sub ls { for (<$_[0]/*>) { print "$_\n"; ls($_) if -d; } }
ls ".";
On Tue, 16 Oct 2001, The Black Man wrote:
> Date: Tue, 16 Oct 2001 08:10:31 -0700 (PDT)
> From: The Black Man <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Listing directory contents
>
> Hi a