htmanning has asked for the wisdom of the Perl Monks concerning the following question:
Monks,
I have a large directory called registrations with a folder for each user who has registered. I need to be able to look into each of these folders via a browser, but I have restricted indexes. I thought I could use Perl to do it. I'm using File::Fine::Rule like this:
I feed it the directory via the URL and It works, but it does not show file sizes or any other info besides the filename. Is there another module I should be using or a better way to do it?use File::Find::Rule; my $base_dir = "/usr/home/username/public_html/registrations/$dir"; my $find_rule = File::Find::Rule->new; foreach $item (@files) { $item =~ s/\/usr\/home\/username\/public_html\/registrations\/$dir +\///g; print "<a href=\"https://www.domain.com/registrations/$dir/$item\" +>$item</a><br>"; }
Thanks.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Using Perl for directory listing
by choroba (Cardinal) on Sep 30, 2022 at 07:09 UTC | |
Re: Using Perl for directory listing
by hippo (Bishop) on Sep 30, 2022 at 08:35 UTC | |
Re: Using Perl for directory listing
by Discipulus (Canon) on Sep 30, 2022 at 09:45 UTC | |
by cavac (Parson) on Oct 03, 2022 at 08:09 UTC | |
Re: Using Perl for directory listing
by LanX (Saint) on Sep 30, 2022 at 09:24 UTC | |
Re: Using Perl for directory listing
by kcott (Archbishop) on Sep 30, 2022 at 20:18 UTC | |
Re: Using Perl for directory listing
by cavac (Parson) on Oct 03, 2022 at 08:12 UTC |
Back to
Seekers of Perl Wisdom