mdunnbass has asked for the wisdom of the Perl Monks concerning the following question:
For instance, I am trying to create backups of files in the midst of a program, in a directory named './backup_files', but at runtime, if the directory doesn't exist, I would want to create it. I assume that if it doesn't exist, I'd create the directory via mkdir, but I also assume it's not a good idea to do something like:
opendir || mkdir || die;
Once I knew I had a directory where I wanted it, I'd use File::Copy to create a copy in the backup directory, and then modify the original however I want. It's just that first step that I am unsure of.
Thanks,
Matt
|
|---|