recursive copy in perl

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • priyadt
    New Member
    • Jul 2007
    • 1

    recursive copy in perl

    Hi All,

    I'm new to this Forum.

    I want to know how to copy all the contents from one directory to another directory in perl.
    In shell we can use cp -r sourcedir destdir . Please say the equivalent for this command in perl script.

    Thanks in advance.


    Regards,
    Priya
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    When you are wanting to do something in Perl, it is always a good idea to look on CPAN for modules that do what you need. For instance, if you search for "copy" on CPAN, on the second page of the search results you would find an entry for File::Copy::Rec ursive , which I believe will do what you are looking to for.

    Regards,

    Jeff

    Comment

    Working...