Okay, lately I have been addicted to perl and I've learned a lot, but I can't figure out how to add something to something after such and such.
I made a simple ftp scanner that scans through and outputs all files and folders recursively, well, up to a certain point. Right now I use this my $global = 'www/*'; which will scan all folders and output their contents after the www folder like so
www/folder1:
files
www/folder2:
files
And so on.
If I use my $global = 'www/*/*'; It will output:
www/folder1/folderinfolder1:
files
www/folder2/folderinfolder2:
files
And so on.
Now, I know this isn't exactly the best way about doing it, but I have spent ages trying to find how to simply print all content from the ftp recursively, and during that search I found many things and examples which didn't actually work, but then I finally managed to figure it out (sort of) and get to this point. So, my question is, how could I add /* to the initial www/* so it becomes www/*/* after it has finished scanning www/*?
Also sorry but I can't find anywhere that tells me how to format posts.
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.