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:
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>";
}
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?
Thanks.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|