Well I am pretty new with perl so I copy and paste alot of code from other snippets of code from other scripts, the
<br> doesnt need to be there it would just print out
<br> if it couldnt open the directory, I just over looked it.
As far as the foreach I am not completly sure the neccessity of the 'unless' but it seems to work fine when its ran on my client machine. As I understand it @thefiles contains the file and folder names from the bankpro directory. It then enters the while loop which takes a line of text from the dismissed2.txt, which contains the names of the folders and files we want to move to the new directory, and appends it to the defaultdir in the system qq(move...) statement and if the file or folder exsists then it will move it to the destination directory. Then it sets $text to the next line of input in the dismissed2.txt file and keeps looping until all the lines in the file have been read.
Once all the lines of text have been read in the dismissed2.txt then it takes another element from @thefiles and goes through the process again.
Again I am definatly a novice at this and this is what it appears to be doing to me. heh it does work though, just not on the server where I need it to.
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.