Subject: | Use proven helper for copy() |
copy {} and such should rely on File::Copy. Doing
my $file = join '', <$fh>;
is a bad idea for large files..
my $sfh = $fs->open_read($file); # source and destination filehandles
my $dfh = $fs->open_write($destfile);
File::Copy::copy($sfh,$dfh);
$fs->close_read($sfh);
$fs->close_write($dfh);