anjiro has asked for the wisdom of the Perl Monks concerning the following question:
Of course, there's no File::IdealCopy. Any ideas?use File::IdealCopy; my $cp = new IdealCopy(recursive => 1, rename_callback => \&rename, post_copy_callback => \&post); IdealCopy("/mnt/source", "/data/dest"); sub rename { return lc; } sub post { open FP1, $_[0] or die; open FP2, ">$_[0].new" or die; while(<FP>) { chomp; print FP2, $_ + 1, $/; } close FP1; close FP2; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Recursive copy with processing
by dragonchild (Archbishop) on May 01, 2006 at 19:08 UTC |