http://www.perlmonks.org?node_id=1074477


in reply to Re: Why can't I create a directory with File::Spec
in thread Why can't I create a directory with File::Spec

Ken, thank you for catching the error. I added it in the post, but it is not in the code I wrote. Please see new code:

use strict; use warnings; use diagnostics; use autodie; use File::Spec; use File::Path qw( make_path remove_tree ); #Set command line arguments my ($website, $old_ip, $new_ip) = @ARGV; #Set vars my $volume = 'C:/'; + my $ARCHIVE = File::Spec->catpath($volume, qw(Desktop), $website, $ +old_ip, $TIMESTAMP); my $TIMESTAMP = strftime("%Y%m%d%H%M", localtime); my @WEBSITES = qw( three five calnet-test ); #Creates the new dir in archive sub initialize { make_path ($ARCHIVE); return; } initialize;