MLUG: Re: [MLUG - DISCUSSION] Dumb Perl Question
Re: [MLUG - DISCUSSION] Dumb Perl Question
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Marcus Semanek wrote:
> 
> Turn on indexing for that directory and get rid of
> your index doc, you're all finished :)
> 

That is a great solution. Really!

But if you're not your own Web admin or still need the code, try this:

opendir(DIR, $directory);
@files = grep {-f "$directory/$_" } readdir(DIR);

foreach $file (@files) {
	print "<a href="/path/$file">$file</a><br>\n";
}

Also see 'readdir' entry in man perlfunc.
-- 
MK
--
To unsubscribe, go to http://mlug.missouri.edu/members/edit.php

Archives are available at http://mlug.missouri.edu/list-archives/