smturner1 has asked for the wisdom of the Perl Monks concerning the following question:
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 $TIMESTAMP = strftime("%Y%m%d%H%M", localtime); + my $volume = 'C:/'; + my $ARCHIVE = File::Spec->catpath($volume, qw(Desktop), $websit +e, $old_ip, $TIMESTAMP); my @WEBSITES = qw( three five calnet-test ); my $ARCHIVE = File::Spec->catpath($volume, qw(Desktop), $website, $ol +d_ip, $TIMESTAMP); #Creates the new dir in archive sub initialize { make_path ($ARCHIVE); return; } initialize;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why can't I create a directory with File::Spec
by kcott (Archbishop) on Feb 07, 2014 at 05:51 UTC | |
by smturner1 (Sexton) on Feb 11, 2014 at 19:09 UTC | |
|
Re: Why can't I create a directory with File::Spec
by Anonymous Monk on Feb 07, 2014 at 07:13 UTC |