From aamcfarland at gmail.com Tue Oct 24 07:53:39 2006 From: aamcfarland at gmail.com (Andrew McFarland) Date: Tue, 24 Oct 2006 15:53:39 +0100 Subject: [Belfast-pm] Copying a directory Message-ID: <99fe3dfd0610240753o2c8f7d13q994327178b7cabd0@mail.gmail.com> How do I copy a directory in Perl? I've tried #!/usr/bin/perl use warnings; use strict; use File::Copy; copy("dir1","dir2") || die "Copy failed: $!"; Which gives: Copy failed: no such file or directory at copy.pl line 5. (Please be gentle, I'm returning to perl programming after a long absence....) Andrew -- We can't change the past, but each of us, by challenging prejudice and intolerance, can help to change the future. - Rabbi Jonathan Sacks, Address at Holocaust Memorial Day, Westminster Hall, London, 27th January 2005 From Smylers at stripey.com Tue Oct 24 07:57:56 2006 From: Smylers at stripey.com (Smylers) Date: Tue, 24 Oct 2006 15:57:56 +0100 Subject: [Belfast-pm] Copying a directory In-Reply-To: <99fe3dfd0610240753o2c8f7d13q994327178b7cabd0@mail.gmail.com> References: <99fe3dfd0610240753o2c8f7d13q994327178b7cabd0@mail.gmail.com> Message-ID: <20061024145756.GG32289@stripey.com> Andrew McFarland writes: > How do I copy a directory in Perl? Have a look at the File::Copy::Recursive module. Smylers