Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Copy dir with spaceby Don Coyote (Hermit) |
on Jul 10, 2014 at 09:29 UTC ( [id://1093016]=note: print w/replies, xml ) | Need Help?? |
Hi adriang, I contend there are several issues here, least of which is the filename containing a space. Firstly, use strict and warnings, if you did already, pls include with code example to show this. Secondly, copy, afaik is not a perl built-in (perldoc -f copy = not found). copy is a utility function which can be found in another module similar to File::Spec, I cannot recall which this moment. So basically, opendir to copy files from, readdir, filter, read contents into filehandle, open new filehandle name in destination directory, print contents. Untested! But, principally something like this, if the 'copy' containing module cannot be used.
DC
In Section
Seekers of Perl Wisdom
|
|