L
Lénaïc Huard
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I'm looking for a way to copy a directory and all its content with perl ;
that is to say the perl function equivalent to the "cp -R" Unix command.
I've looked the 'File::Copy' package, but I only managed to copy regular
files and not directories.
If toto is a directory, the following lines create an empty regular file
named tata, whereas I expected tata to be new directory containing a copy
of toto's content.
use File::Copy;
copy( "toto", "tata" );
Does anybody have a nicer idea than a
system( "cp -R toto tata" );
which is not very portable...
Thanks,
Lénaïc.
- --
(o_ Lénaïc HUARD
//\ (e-mail address removed)
V_/_ KeyID: 0x04D2E818
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBKFnIjYEjJATS6BgRAsaCAKCHuCyqllVr59P1cnxID9NyONEDJACgqOVn
hCEkKvRqSQwQ+hTiTI/14bQ=
=85pH
-----END PGP SIGNATURE-----
Hash: SHA1
Hello,
I'm looking for a way to copy a directory and all its content with perl ;
that is to say the perl function equivalent to the "cp -R" Unix command.
I've looked the 'File::Copy' package, but I only managed to copy regular
files and not directories.
If toto is a directory, the following lines create an empty regular file
named tata, whereas I expected tata to be new directory containing a copy
of toto's content.
use File::Copy;
copy( "toto", "tata" );
Does anybody have a nicer idea than a
system( "cp -R toto tata" );
which is not very portable...
Thanks,
Lénaïc.
- --
(o_ Lénaïc HUARD
//\ (e-mail address removed)
V_/_ KeyID: 0x04D2E818
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBKFnIjYEjJATS6BgRAsaCAKCHuCyqllVr59P1cnxID9NyONEDJACgqOVn
hCEkKvRqSQwQ+hTiTI/14bQ=
=85pH
-----END PGP SIGNATURE-----