The viewer enters a Perl script into your web page form, the server runs the script, and returns a list of directories.

There seem to be a few steps missing.

How do you know the viewers script generates a list of directories? it might delete every file it encounters, or count the number of jelly beans that fit between the earth and the moon, or, more likely, not do anything useful, or be incorrect.

If you want visitors to explore your directory hierarchy, how about displaying the top-level directories as checkbuttons, allowing the visitor to select on and drill down through your file system. But why would anyone want to explore your layout, other than a hacker looking for ways to break in.

Why not think about what you really want the viusitor to achieve, and ask questions about that?

--
TTTATCGGTCGTTATATAGATGTTTGCA


In reply to Re: reverse script by TomDLux
in thread reverse script by linex

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.