in reply to Re: copy to different directory
in thread copy to different directory
Note as memory efficient as File::Copy, of course...use strict; use IO::All; use File::Spec; my $source_directory = 'foo'; my $target_directory = 'bar'; sub copyfile { for my $file (@_) { my $sourcename = File::Spec->catfile( $source_directory,$file); my $targetname = File::Spec->catfile( $target_directory,$file); io($targetname)->print(io($sourcename)->slurp); }; copyfile('README');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: copy to different directory
by Corion (Patriarch) on Mar 21, 2004 at 13:55 UTC |