i am having a folder Dir_1.
it has many files like
file1
DOC ( this is a Directory)
file2
after i execute my test the folder contents change like
file1
file2
<file3
DOC
DIR_2
i had written a procedure which does folowing thing
it accepts a array as arguments which has all files names in current working Directory. all files before execution of script are in this array
inside the procedure again i define a array which contain all the files in current working Directory. this will include all files
generated by test script.now i want to delete those files which were in old array and not in new array.
one way of doing is to compare each file of both arrays using for loop but this is highly ineffcient. can you tell me to do same in much efficient manner
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.