Hey Monks!

Two questions for you all!

1. How do I move things from one directory to another in a perl script. SOO for example, I have the following directory structure:

Main

----- DIR 1

----- DIR 2

---------- DIR 2 SUB 1

I have a perl script which executes in DIR 1 and generates a file, but I want the file to be placed in DIR 2. As far as I know, this isn't easy. It's easy to say place a file from DIR 2 into DIR 2 Sub. I could of course physical move the files but I would rather know if I could do this using a perl script.

2. How do I make a perl script that executes several other perl scripts?

My last sneaky question is, say I want to make a script that updates certain files once a month (i.e. it will FTP them) is there I way I could automate this? Or would I have to manually tell the update script to run each month?

Any help would be great : )


In reply to Moving Files by Anonymous Monk

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.