Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict; use warnings;
    
    ...
        my $target = dir($dest, $path->basename);
        dircopy $path, $target or die "Error copying $path: $!";
    }
    
  2. or download this
    for my $path (dir($source)->children) {
        next if $path =~ /^\./;     # exclude hidden files and directories
    ...
        my $target = dir($dest, $path->basename);
        dircopy $path, $target or die "Error copying $path: $!";
    }