I dont know where to start, which functions to use in pearl i searched for "moving files" but didnt find exactly what i need in this case.

<pedantic>It's "Perl" for the language, "perl" for the executable name. Not "PERL", and certainly not "pearl".</pedantic>

As to not knowing where to start - I suggest figuring out the steps that you need to take to make this happen, and then creating those steps out of the available functions. Experienced programmers, of course, know what all (or most) of the functions are and design their programs out of those "building blocks"; since you appear to be just starting out, you'll need to run a few cycles of this before you succeed.

Here's an idea of how you might approach this (this is based on what you've already said; there are better approaches):

[pseudocode] Loop over the list of files in the source directory Read each file's date If date contains 2008 Move file to target directory End if End loop

That's half the job done for you. All you have to do is read "perldoc perlfunc" and fill in the blanks.


--
"Language shapes the way we think, and determines what we can think about."
-- B. L. Whorf

In reply to Re: moving files in a dir (Maildir) depending on Date by oko1
in thread moving files in a dir (Maildir) depending on Date by matze77

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.