Re: Listing directory

2003-03-26 Thread Matt O'neill
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

RE: Listing directory

2003-03-25 Thread Dan Muey
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

RE: Listing directory

2003-03-25 Thread Bakken, Luke
> > 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

RE: Listing directory

2003-03-25 Thread Bakken, Luke
> 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

Re: Listing directory contents

2001-10-18 Thread rich+ml
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