Hi koakamper,
First, I hope that ReadParse handles responses like '../../../..' . (I know, of course it does, but you'd be surprised at the holes some people leave...)
Second, you have single quotes around your vars, which will keep their values from being used.
Third, it's not clear to me why you're removing two whole trees ($dir_location and $sub_dir), or how $sub_dir is actually a subdirectory of anything. The first argument to rmtree is a list of directories to remove; in your case, you'd get the directory "/home/sites/www.domain.net/web/test/" removed, as well as whatever was in $in{'sub_dir'}. This may not be what you want (might you want to concatenate them?).
Fourth, you don't say how it's "not working". If this is really a quote from your text, the single quotes probably broke it. Looking at the code for File::Path, rmtree uses readdir, which shouldn't have any problems with "dot files" like .htaccess. What's the problem?
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.