ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I'm in the middle of writing my first perl script.(had to happen sometime)
So far when i click submit the script makes an HTML page that has the same look as the rest of the pages on my site.
and thats pretty swell. Now i need to read the contents of a DIR
and make a link to each file in that DIR. I've been trying to implement
readdir(), but not having much luck. I will gladly affero pay someone for helping me out with this as soon as I get paid for the job.
this is the relevant part of the script so far:
return if($_ =~ /^\./);
return unless($_ =~ /\$filetype/i);
return if -d;
return unless -r;
opendir(DIR, $scandir) or return;
my $file_name = $1;